public class GangliaReporter extends AbstractPollingReporter implements MetricProcessor<String>
| Modifier and Type | Field and Description |
|---|---|
boolean |
printVMMetrics |
| Constructor and Description |
|---|
GangliaReporter(MetricsRegistry metricsRegistry,
String gangliaHost,
int port,
String groupPrefix)
Creates a new
GangliaReporter. |
GangliaReporter(MetricsRegistry metricsRegistry,
String gangliaHost,
int port,
String groupPrefix,
MetricPredicate predicate)
Creates a new
GangliaReporter. |
GangliaReporter(MetricsRegistry metricsRegistry,
String gangliaHost,
int port,
String groupPrefix,
MetricPredicate predicate,
boolean compressPackageNames)
Creates a new
GangliaReporter. |
GangliaReporter(MetricsRegistry metricsRegistry,
String groupPrefix,
MetricPredicate predicate,
boolean compressPackageNames,
com.yammer.metrics.reporting.GangliaMessageBuilder gangliaMessageBuilder,
VirtualMachineMetrics vm)
Creates a new
GangliaReporter. |
GangliaReporter(String gangliaHost,
int port)
Creates a new
GangliaReporter. |
GangliaReporter(String gangliaHost,
int port,
boolean compressPackageNames)
Creates a new
GangliaReporter. |
| Modifier and Type | Method and Description |
|---|---|
static void |
enable(long period,
TimeUnit unit,
String gangliaHost,
int port)
Enables the ganglia reporter to send data for the default metrics registry to ganglia server
with the specified period.
|
static void |
enable(long period,
TimeUnit unit,
String gangliaHost,
int port,
boolean compressPackageNames)
Enables the ganglia reporter to send data for the default metrics registry to ganglia server
with the specified period.
|
static void |
enable(long period,
TimeUnit unit,
String gangliaHost,
int port,
String groupPrefix)
Enables the ganglia reporter to send data for the default metrics registry to ganglia server
with the specified period.
|
static void |
enable(MetricsRegistry metricsRegistry,
long period,
TimeUnit unit,
String gangliaHost,
int port,
String groupPrefix)
Enables the ganglia reporter to send data for the given metrics registry to ganglia server
with the specified period.
|
static void |
enable(MetricsRegistry metricsRegistry,
long period,
TimeUnit unit,
String gangliaHost,
int port,
String groupPrefix,
MetricPredicate predicate)
Enables the ganglia reporter to send data to ganglia server with the specified period.
|
static void |
enable(MetricsRegistry metricsRegistry,
long period,
TimeUnit unit,
String gangliaHost,
int port,
String groupPrefix,
MetricPredicate predicate,
boolean compressPackageNames)
Enables the ganglia reporter to send data to ganglia server with the specified period.
|
void |
processCounter(MetricName name,
Counter counter,
String x) |
void |
processGauge(MetricName name,
Gauge<?> gauge,
String x) |
void |
processHistogram(MetricName name,
Histogram histogram,
String x) |
void |
processMeter(MetricName name,
Metered meter,
String x) |
void |
processTimer(MetricName name,
Timer timer,
String x) |
void |
run() |
protected String |
sanitizeName(MetricName name) |
shutdown, shutdown, startgetMetricsRegistrypublic GangliaReporter(String gangliaHost, int port) throws IOException
GangliaReporter.gangliaHost - is ganglia serverport - is port on which ganglia server is runningIOException - if there is an error connecting to the ganglia serverpublic GangliaReporter(String gangliaHost, int port, boolean compressPackageNames) throws IOException
GangliaReporter.gangliaHost - is ganglia serverport - is port on which ganglia server is runningcompressPackageNames - whether or not Metrics' package names will be shortenedIOException - if there is an error connecting to the ganglia serverpublic GangliaReporter(MetricsRegistry metricsRegistry, String gangliaHost, int port, String groupPrefix) throws IOException
GangliaReporter.metricsRegistry - the metrics registrygangliaHost - is ganglia serverport - is port on which ganglia server is runninggroupPrefix - prefix to the ganglia group name (such as myapp_counter)IOException - if there is an error connecting to the ganglia serverpublic GangliaReporter(MetricsRegistry metricsRegistry, String gangliaHost, int port, String groupPrefix, MetricPredicate predicate) throws IOException
GangliaReporter.metricsRegistry - the metrics registrygangliaHost - is ganglia serverport - is port on which ganglia server is runninggroupPrefix - prefix to the ganglia group name (such as myapp_counter)predicate - filters metrics to be reportedIOException - if there is an error connecting to the ganglia serverpublic GangliaReporter(MetricsRegistry metricsRegistry, String gangliaHost, int port, String groupPrefix, MetricPredicate predicate, boolean compressPackageNames) throws IOException
GangliaReporter.metricsRegistry - the metrics registrygangliaHost - is ganglia serverport - is port on which ganglia server is runninggroupPrefix - prefix to the ganglia group name (such as myapp_counter)predicate - filters metrics to be reportedcompressPackageNames - if true reporter will compress package names e.g.
com.foo.MetricName becomes c.f.MetricNameIOException - if there is an error connecting to the ganglia serverpublic GangliaReporter(MetricsRegistry metricsRegistry, String groupPrefix, MetricPredicate predicate, boolean compressPackageNames, com.yammer.metrics.reporting.GangliaMessageBuilder gangliaMessageBuilder, VirtualMachineMetrics vm) throws IOException
GangliaReporter.metricsRegistry - the metrics registrygroupPrefix - prefix to the ganglia group name (such as myapp_counter)predicate - filters metrics to be reportedcompressPackageNames - if true reporter will compress package names e.g.
com.foo.MetricName becomes c.f.MetricNamegangliaMessageBuilder - a GangliaMessageBuilder instancevm - a VirtualMachineMetrics isntanceIOException - if there is an error connecting to the ganglia serverpublic static void enable(long period,
TimeUnit unit,
String gangliaHost,
int port)
period - the period between successive outputsunit - the time unit of periodgangliaHost - the gangliaHost name of ganglia server (carbon-cache agent)port - the port number on which the ganglia server is listeningpublic static void enable(long period,
TimeUnit unit,
String gangliaHost,
int port,
String groupPrefix)
period - the period between successive outputsunit - the time unit of periodgangliaHost - the gangliaHost name of ganglia server (carbon-cache agent)port - the port number on which the ganglia server is listeninggroupPrefix - prefix to the ganglia group name (such as myapp_counter)public static void enable(long period,
TimeUnit unit,
String gangliaHost,
int port,
boolean compressPackageNames)
period - the period between successive outputsunit - the time unit of periodgangliaHost - the gangliaHost name of ganglia server (carbon-cache agent)port - the port number on which the ganglia server is listeningcompressPackageNames - if true reporter will compress package names e.g.
com.foo.MetricName becomes c.f.MetricNamepublic static void enable(MetricsRegistry metricsRegistry, long period, TimeUnit unit, String gangliaHost, int port, String groupPrefix)
metricsRegistry - the metrics registryperiod - the period between successive outputsunit - the time unit of periodgangliaHost - the gangliaHost name of ganglia server (carbon-cache agent)port - the port number on which the ganglia server is listeninggroupPrefix - prefix to the ganglia group name (such as myapp_counter)public static void enable(MetricsRegistry metricsRegistry, long period, TimeUnit unit, String gangliaHost, int port, String groupPrefix, MetricPredicate predicate)
metricsRegistry - the metrics registryperiod - the period between successive outputsunit - the time unit of periodgangliaHost - the gangliaHost name of ganglia server (carbon-cache agent)port - the port number on which the ganglia server is listeninggroupPrefix - prefix to the ganglia group name (such as myapp_counter)predicate - filters metrics to be reportedpublic static void enable(MetricsRegistry metricsRegistry, long period, TimeUnit unit, String gangliaHost, int port, String groupPrefix, MetricPredicate predicate, boolean compressPackageNames)
metricsRegistry - the metrics registryperiod - the period between successive outputsunit - the time unit of periodgangliaHost - the gangliaHost name of ganglia server (carbon-cache agent)port - the port number on which the ganglia server is listeninggroupPrefix - prefix to the ganglia group name (such as myapp_counter)predicate - filters metrics to be reportedcompressPackageNames - if true reporter will compress package names e.g.
com.foo.MetricName becomes c.f.MetricNamepublic void run()
run in interface Runnablerun in class AbstractPollingReporterpublic void processGauge(MetricName name, Gauge<?> gauge, String x) throws IOException
processGauge in interface MetricProcessor<String>IOExceptionpublic void processCounter(MetricName name, Counter counter, String x) throws IOException
processCounter in interface MetricProcessor<String>IOExceptionpublic void processMeter(MetricName name, Metered meter, String x) throws IOException
processMeter in interface MetricProcessor<String>IOExceptionpublic void processHistogram(MetricName name, Histogram histogram, String x) throws IOException
processHistogram in interface MetricProcessor<String>IOExceptionpublic void processTimer(MetricName name, Timer timer, String x) throws IOException
processTimer in interface MetricProcessor<String>IOExceptionprotected String sanitizeName(MetricName name)
Copyright © 2012. All Rights Reserved.