|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.yammer.metrics.reporting.AbstractReporter
com.yammer.metrics.reporting.AbstractPollingReporter
com.yammer.metrics.reporting.GraphiteReporter
public class GraphiteReporter
A simple reporter which sends out application metrics to a Graphite server periodically.
| Field Summary | |
|---|---|
boolean |
printVMMetrics
|
| Fields inherited from class com.yammer.metrics.reporting.AbstractReporter |
|---|
metricsRegistry |
| Constructor Summary | |
|---|---|
GraphiteReporter(MetricsRegistry metricsRegistry,
String host,
int port,
String prefix)
Creates a new GraphiteReporter. |
|
GraphiteReporter(MetricsRegistry metricsRegistry,
String prefix,
MetricPredicate predicate,
SocketProvider socketProvider,
Clock clock)
Creates a new GraphiteReporter. |
|
GraphiteReporter(String host,
int port,
String prefix)
Creates a new GraphiteReporter. |
|
| Method Summary | |
|---|---|
static void |
enable(long period,
TimeUnit unit,
String host,
int port)
Enables the graphite reporter to send data for the default metrics registry to graphite server with the specified period. |
static void |
enable(long period,
TimeUnit unit,
String host,
int port,
String prefix)
Enables the graphite reporter to send data to graphite server with the specified period. |
static void |
enable(MetricsRegistry metricsRegistry,
long period,
TimeUnit unit,
String host,
int port)
Enables the graphite reporter to send data for the given metrics registry to graphite server with the specified period. |
static void |
enable(MetricsRegistry metricsRegistry,
long period,
TimeUnit unit,
String host,
int port,
String prefix)
Enables the graphite reporter to send data to graphite server with the specified period. |
static void |
enable(MetricsRegistry metricsRegistry,
long period,
TimeUnit unit,
String host,
int port,
String prefix,
MetricPredicate predicate)
Enables the graphite reporter to send data to graphite server with the specified period. |
void |
processCounter(MetricName name,
CounterMetric counter,
Long epoch)
|
void |
processGauge(MetricName name,
GaugeMetric<?> gauge,
Long epoch)
|
void |
processHistogram(MetricName name,
HistogramMetric histogram,
Long epoch)
|
void |
processMeter(MetricName name,
Metered meter,
Long epoch)
|
void |
processTimer(MetricName name,
TimerMetric timer,
Long epoch)
|
void |
run()
|
| Methods inherited from class com.yammer.metrics.reporting.AbstractPollingReporter |
|---|
shutdown, shutdown, start |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public boolean printVMMetrics
| Constructor Detail |
|---|
public GraphiteReporter(String host,
int port,
String prefix)
throws IOException
GraphiteReporter.
host - is graphite serverport - is port on which graphite server is runningprefix - is prepended to all names reported to graphite
IOException - if there is an error connecting to the Graphite server
public GraphiteReporter(MetricsRegistry metricsRegistry,
String host,
int port,
String prefix)
throws IOException
GraphiteReporter.
metricsRegistry - the metrics registryhost - is graphite serverport - is port on which graphite server is runningprefix - is prepended to all names reported to graphite
IOException - if there is an error connecting to the Graphite server
public GraphiteReporter(MetricsRegistry metricsRegistry,
String prefix,
MetricPredicate predicate,
SocketProvider socketProvider,
Clock clock)
throws IOException
GraphiteReporter.
metricsRegistry - the metrics registryprefix - is prepended to all names reported to graphitepredicate - filters metrics to be reported
IOException - if there is an error connecting to the Graphite server| Method Detail |
|---|
public static void enable(long period,
TimeUnit unit,
String host,
int port)
period - the period between successive outputsunit - the time unit of periodhost - the host name of graphite server (carbon-cache agent)port - the port number on which the graphite server is listening
public static void enable(MetricsRegistry metricsRegistry,
long period,
TimeUnit unit,
String host,
int port)
metricsRegistry - the metrics registryperiod - the period between successive outputsunit - the time unit of periodhost - the host name of graphite server (carbon-cache agent)port - the port number on which the graphite server is listening
public static void enable(long period,
TimeUnit unit,
String host,
int port,
String prefix)
period - the period between successive outputsunit - the time unit of periodhost - the host name of graphite server (carbon-cache agent)port - the port number on which the graphite server is listeningprefix - the string which is prepended to all metric names
public static void enable(MetricsRegistry metricsRegistry,
long period,
TimeUnit unit,
String host,
int port,
String prefix)
metricsRegistry - the metrics registryperiod - the period between successive outputsunit - the time unit of periodhost - the host name of graphite server (carbon-cache agent)port - the port number on which the graphite server is listeningprefix - the string which is prepended to all metric names
public static void enable(MetricsRegistry metricsRegistry,
long period,
TimeUnit unit,
String host,
int port,
String prefix,
MetricPredicate predicate)
metricsRegistry - the metrics registryperiod - the period between successive outputsunit - the time unit of periodhost - the host name of graphite server (carbon-cache agent)port - the port number on which the graphite server is listeningprefix - the string which is prepended to all metric namespredicate - filters metrics to be reportedpublic void run()
run in interface Runnable
public void processGauge(MetricName name,
GaugeMetric<?> gauge,
Long epoch)
throws IOException
processGauge in interface MetricsProcessor<Long>IOException
public void processCounter(MetricName name,
CounterMetric counter,
Long epoch)
throws IOException
processCounter in interface MetricsProcessor<Long>IOException
public void processMeter(MetricName name,
Metered meter,
Long epoch)
throws IOException
processMeter in interface MetricsProcessor<Long>IOException
public void processHistogram(MetricName name,
HistogramMetric histogram,
Long epoch)
throws IOException
processHistogram in interface MetricsProcessor<Long>IOException
public void processTimer(MetricName name,
TimerMetric timer,
Long epoch)
throws IOException
processTimer in interface MetricsProcessor<Long>IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||