public class PrometheusCollector extends AbstractRemoteServiceCollector
Constructor and Description |
---|
PrometheusCollector() |
Modifier and Type | Method and Description |
---|---|
CollectionSet |
collect(CollectionAgent agent,
Map<String,Object> map)
Invokes a collection on the object.
|
RrdRepository |
getRrdRepository(String collectionName)
Retrieve the
RrdRepository configuration for the given collection. |
Map<String,Object> |
getRuntimeAttributes(CollectionAgent agent,
Map<String,Object> parameters)
Invoked before every call to
#collect(CollectionAgent, EventProxy, Map) in order
to retrieve state/runtime information required for perform the collection. |
void |
initialize()
Initialize the collector.
|
void |
setPrometheusCollectionDao(PrometheusDataCollectionConfigDao prometheusCollectionDao) |
protected static CollectionSet |
toCollectionSet(CollectionAgent agent,
PrometheusCollectionRequest request,
List<Metric> metrics) |
getEffectiveLocation, marshalParameters, unmarshalParameters
validateAgent
public void initialize()
ServiceCollector
initialize
in interface ServiceCollector
initialize
in class AbstractServiceCollector
public Map<String,Object> getRuntimeAttributes(CollectionAgent agent, Map<String,Object> parameters)
ServiceCollector
#collect(CollectionAgent, EventProxy, Map)
in order
to retrieve state/runtime information required for perform the collection.
This call will always be performed in OpenNMS.getRuntimeAttributes
in interface ServiceCollector
getRuntimeAttributes
in class AbstractServiceCollector
agent
- Includes details about to the agent from which we wish to collect.parameters
- Includes the service parameters defined in collectd-configuration.xml.#collect(CollectionAgent, EventProxy, Map)
.public CollectionSet collect(CollectionAgent agent, Map<String,Object> map) throws CollectionException
ServiceCollector
agent
- a org.opennms.netmgt.collectd.CollectionAgent
object.map
- a Map
object.org.opennms.netmgt.config.collector.CollectionSet
object.CollectionException
protected static CollectionSet toCollectionSet(CollectionAgent agent, PrometheusCollectionRequest request, List<Metric> metrics)
public RrdRepository getRrdRepository(String collectionName)
ServiceCollector
RrdRepository
configuration for the given collection.
This call will always be performed in OpenNMS.collectionName
- a String
object.RrdRepository
object.public void setPrometheusCollectionDao(PrometheusDataCollectionConfigDao prometheusCollectionDao)
Copyright © 2021. All rights reserved.