Class XmpCollector
- java.lang.Object
-
- org.opennms.netmgt.collection.api.AbstractServiceCollector
-
- org.opennms.netmgt.protocols.xmp.collector.XmpCollector
-
- All Implemented Interfaces:
ServiceCollector
public class XmpCollector extends AbstractServiceCollector
-
-
Constructor Summary
Constructors Constructor Description XmpCollector()
Constructor for XmpCollector.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description CollectionSet
collect(CollectionAgent agent, java.util.Map<java.lang.String,java.lang.Object> parameters)
Invokes a collection on the object.protected Resource
getResource(NodeLevelResource nodeLevelResource, java.lang.String nodeTypeName, java.lang.String resourceType, java.lang.String instance)
RrdRepository
getRrdRepository(java.lang.String collectionName)
Retrieve theRrdRepository
configuration for the given collection.void
initialize()
Initialize the collector.protected static java.lang.String
sanitizeInstance(java.lang.String instance)
java.lang.String
serviceName()
who am I and what am I ? *void
setResourceTypesDao(ResourceTypesDao resourceTypesDao)
-
Methods inherited from class org.opennms.netmgt.collection.api.AbstractServiceCollector
getEffectiveLocation, getRuntimeAttributes, marshalParameters, unmarshalParameters, validateAgent
-
-
-
-
Method Detail
-
initialize
public void initialize()
Initialize the collector. This call will be invoked in OpenNMS before any other calls to the collector are made. This function may be invoked several times during the lifetime or the collector. initialize our XmpCollector with global parameters *- Specified by:
initialize
in interfaceServiceCollector
- Overrides:
initialize
in classAbstractServiceCollector
-
serviceName
public java.lang.String serviceName()
who am I and what am I ? *- Returns:
- a
String
object.
-
collect
public CollectionSet collect(CollectionAgent agent, java.util.Map<java.lang.String,java.lang.Object> parameters) throws CollectionException
Invokes a collection on the object. This call will be performed in both OpenNMS and Minion. Collect data, via XMP, from a particular agent EventProxy is used to send opennms events into the system in case a collection fails or if a system is back working again after a failure (suceed event). But otherwise, no events sent if collection succeeds. Collect is called once per agent per collection cycle. Parameters are a map of String Key/String Value passed in. Keys come from collectd config- Parameters:
agent
- aorg.opennms.netmgt.collectd.CollectionAgent
object.parameters
- aMap
object.- Returns:
- a
org.opennms.netmgt.config.collector.CollectionSet
object. - Throws:
CollectionException
-
getRrdRepository
public RrdRepository getRrdRepository(java.lang.String collectionName)
Retrieve theRrdRepository
configuration for the given collection. This call will always be performed in OpenNMS.- Parameters:
collectionName
- aString
object.- Returns:
- a
RrdRepository
object.
-
sanitizeInstance
protected static java.lang.String sanitizeInstance(java.lang.String instance)
-
getResource
protected Resource getResource(NodeLevelResource nodeLevelResource, java.lang.String nodeTypeName, java.lang.String resourceType, java.lang.String instance) throws CollectionException
- Throws:
CollectionException
-
setResourceTypesDao
public void setResourceTypesDao(ResourceTypesDao resourceTypesDao)
-
-