Module: Simple::Metrics::Graphite

Defined in:
lib/simple/metrics/graphite.rb

Instance Method Summary collapse

Instance Method Details

#enable_graphite_reporter(server_name, server_port, prefix, interval_in_seconds = 60) ⇒ Object

Enable reporting directly to graphite

Parameters:

  • server_name (String)

    The hostname of the graphite server.

  • server_port (Int)

    The port that graphite is running on.

  • prefix (String)

    The prefix to store the data under, eg: ‘services.development`. The class name, or name of the application will be appended: `services.development.teatime`

  • interval_in_seconds (Int) (defaults to: 60)

    Time interval for sending to graphite in seconds. (Defaults to 1 sec)



17
18
19
20
# File 'lib/simple/metrics/graphite.rb', line 17

def enable_graphite_reporter(server_name, server_port, prefix, interval_in_seconds = 60)
  GraphiteReporter.enable(interval_in_seconds, TimeUnit::SECONDS,
                          server_name, server_port, prefix)
end