public class DefaultGangliaMetricsReporter extends Object implements GangliaMetricsReporter
| Modifier and Type | Field and Description |
|---|---|
protected String |
address |
protected org.onosproject.cfg.ComponentConfigService |
cfgService |
protected org.onosproject.core.CoreService |
coreService |
protected String |
metricNames |
protected org.onlab.metrics.MetricsService |
metricsService |
protected boolean |
monitorAll |
protected int |
port |
protected int |
ttl |
| Constructor and Description |
|---|
DefaultGangliaMetricsReporter() |
| Modifier and Type | Method and Description |
|---|---|
void |
activate() |
protected boolean |
containsName(String full,
String prefixes)
Looks up whether the metric name contains the given prefix keywords.
|
void |
deactivate() |
protected com.codahale.metrics.MetricRegistry |
filter(com.codahale.metrics.MetricRegistry metricRegistry)
Filters the metrics to only include a set of the given metrics.
|
void |
modified(org.osgi.service.component.ComponentContext context) |
void |
notifyMetricsChange() |
void |
restartReport() |
void |
startReport() |
void |
stopReport() |
@Reference(cardinality=MANDATORY_UNARY) protected org.onosproject.core.CoreService coreService
@Reference(cardinality=MANDATORY_UNARY) protected org.onlab.metrics.MetricsService metricsService
@Reference(cardinality=MANDATORY_UNARY) protected org.onosproject.cfg.ComponentConfigService cfgService
@Property(name="monitorAll",
boolValue=true,
label="Enable to monitor all of metrics stored in metric registry default is true")
protected boolean monitorAll
@Property(name="metricNames",
value="default",
label="Names of metric to be monitored; default metric names are \'default\'")
protected String metricNames
@Property(name="address",
value="localhost",
label="IP address of ganglia monitoring server; default is localhost")
protected String address
@Property(name="port",
intValue=8649,
label="Port number of ganglia monitoring server; default is 8649")
protected int port
@Property(name="ttl",
intValue=1,
label="TTL value of ganglia monitoring server; default is 1")
protected int ttl
@Activate public void activate()
@Deactivate public void deactivate()
@Modified public void modified(org.osgi.service.component.ComponentContext context)
public void startReport()
startReport in interface org.onlab.metrics.MetricsReporterpublic void stopReport()
stopReport in interface org.onlab.metrics.MetricsReporterpublic void restartReport()
restartReport in interface org.onlab.metrics.MetricsReporterpublic void notifyMetricsChange()
notifyMetricsChange in interface org.onlab.metrics.MetricsReporterprotected com.codahale.metrics.MetricRegistry filter(com.codahale.metrics.MetricRegistry metricRegistry)
metricRegistry - original metric registryprotected boolean containsName(String full, String prefixes)
full - the original metric name that to be compared withprefixes - the prefix keywords that are matched against with the metric name