@Service public class DefaultInfluxDbMetricsRetriever extends Object implements InfluxDbMetricsRetriever
| Modifier and Type | Field and Description |
|---|---|
protected org.onosproject.core.CoreService |
coreService |
protected String |
database |
| Constructor and Description |
|---|
DefaultInfluxDbMetricsRetriever() |
| Modifier and Type | Method and Description |
|---|---|
void |
activate() |
protected Map<org.onosproject.cluster.NodeId,Set<String>> |
allMetricNames()
Returns all metric names that bound with node identification.
|
Map<org.onosproject.cluster.NodeId,Map<String,InfluxMetric>> |
allMetrics()
Returns last metric values from all nodes.
|
Map<org.onosproject.cluster.NodeId,Map<String,List<InfluxMetric>>> |
allMetrics(int period,
TimeUnit unit)
Returns metric values of all nodes within a given period of time.
|
void |
config(String address,
int port,
String database,
String username,
String password)
Configures default parameters for influx database metrics retriever.
|
void |
deactivate() |
InfluxMetric |
metric(org.onosproject.cluster.NodeId nodeId,
String metricName)
Returns a last metric value from a given node.
|
List<InfluxMetric> |
metric(org.onosproject.cluster.NodeId nodeId,
String metricName,
int period,
TimeUnit unit)
Returns metric value of a given node within a given period of time.
|
Map<org.onosproject.cluster.NodeId,InfluxMetric> |
metricsByName(String metricName)
Returns a collection of last metric values from all nodes.
|
Map<org.onosproject.cluster.NodeId,List<InfluxMetric>> |
metricsByName(String metricName,
int period,
TimeUnit unit)
Returns a collection of last metric values of all nodes within a given period of time.
|
Map<String,InfluxMetric> |
metricsByNodeId(org.onosproject.cluster.NodeId nodeId)
Returns last metric values from a node.
|
Map<String,List<InfluxMetric>> |
metricsByNodeId(org.onosproject.cluster.NodeId nodeId,
int period,
TimeUnit unit)
Returns metric values of a node within a given period of time.
|
@Reference(cardinality=MANDATORY_UNARY) protected org.onosproject.core.CoreService coreService
protected String database
@Activate public void activate()
@Deactivate public void deactivate()
public void config(String address, int port, String database, String username, String password)
InfluxDbMetricsRetrieverconfig in interface InfluxDbMetricsRetrieveraddress - IP address of influxDB serverport - Port number of influxDB serverdatabase - Database name of influxDB serverusername - Username of influxDB serverpassword - Password of influxDB serverpublic Map<org.onosproject.cluster.NodeId,Map<String,List<InfluxMetric>>> allMetrics(int period, TimeUnit unit)
InfluxDbMetricsRetrieverallMetrics in interface InfluxDbMetricsRetrieverperiod - projected periodunit - time unitpublic Map<String,List<InfluxMetric>> metricsByNodeId(org.onosproject.cluster.NodeId nodeId, int period, TimeUnit unit)
InfluxDbMetricsRetrievermetricsByNodeId in interface InfluxDbMetricsRetrievernodeId - node identificationperiod - projected periodunit - time unitpublic Map<org.onosproject.cluster.NodeId,List<InfluxMetric>> metricsByName(String metricName, int period, TimeUnit unit)
InfluxDbMetricsRetrievermetricsByName in interface InfluxDbMetricsRetrievermetricName - metric nameperiod - projected periodunit - time unitpublic List<InfluxMetric> metric(org.onosproject.cluster.NodeId nodeId, String metricName, int period, TimeUnit unit)
InfluxDbMetricsRetrievermetric in interface InfluxDbMetricsRetrievernodeId - node identificationmetricName - metric nameperiod - projected periodunit - time unitpublic Map<org.onosproject.cluster.NodeId,Map<String,InfluxMetric>> allMetrics()
InfluxDbMetricsRetrieverallMetrics in interface InfluxDbMetricsRetrieverpublic Map<String,InfluxMetric> metricsByNodeId(org.onosproject.cluster.NodeId nodeId)
InfluxDbMetricsRetrievermetricsByNodeId in interface InfluxDbMetricsRetrievernodeId - node identificationpublic Map<org.onosproject.cluster.NodeId,InfluxMetric> metricsByName(String metricName)
InfluxDbMetricsRetrievermetricsByName in interface InfluxDbMetricsRetrievermetricName - metric namepublic InfluxMetric metric(org.onosproject.cluster.NodeId nodeId, String metricName)
InfluxDbMetricsRetrievermetric in interface InfluxDbMetricsRetrievernodeId - node identificationmetricName - metric nameCopyright © 2016. All rights reserved.