public abstract class AbstractSnmpCollector extends AbstractServiceCollector
Commons between SnmpCollector and SnmpCollectorNG.
Modifier and Type | Field and Description |
---|---|
protected LocationAwareSnmpClient |
m_client |
static String |
SNMP_STORAGE_PRIMARY
Valid values for the 'snmpStorageFlag' attribute in datacollection-config
XML file.
|
Constructor and Description |
---|
AbstractSnmpCollector() |
Modifier and Type | Method and Description |
---|---|
abstract CollectionSet |
collect(CollectionAgent agent,
Map<String,Object> parameters)
Invokes a collection on the object.
|
RrdRepository |
getRrdRepository(String collectionName)
Retrieve the
RrdRepository configuration for the given collection. |
void |
initialize()
Initialize the collector.
|
String |
serviceName()
Returns the name of the service that the plug-in collects ("SNMP").
|
void |
validateAgent(CollectionAgent agent,
Map<String,Object> parameters)
Validate whether or not this collector should be scheduled
to run against the given agent.
|
getEffectiveLocation, getRuntimeAttributes, marshalParameters, unmarshalParameters
public static final String SNMP_STORAGE_PRIMARY
protected LocationAwareSnmpClient m_client
public String serviceName()
public void initialize()
ServiceCollector
initialize
in interface ServiceCollector
initialize
in class AbstractServiceCollector
public void validateAgent(CollectionAgent agent, Map<String,Object> parameters) throws CollectionInitializationException
ServiceCollector
CollectionInitializationException
must be thrown.
In the case of the SNMP collector, this is used to prevent
collect from scheduling interfaces other than the those
marked as primary on a given node.validateAgent
in interface ServiceCollector
validateAgent
in class AbstractServiceCollector
CollectionInitializationException
public abstract CollectionSet collect(CollectionAgent agent, Map<String,Object> parameters) throws CollectionException
agent
- a org.opennms.netmgt.collectd.CollectionAgent
object.parameters
- a Map
object.org.opennms.netmgt.config.collector.CollectionSet
object.CollectionException
public RrdRepository getRrdRepository(String collectionName)
RrdRepository
configuration for the given collection.
This call will always be performed in OpenNMS.collectionName
- a String
object.RrdRepository
object.Copyright © 2021. All rights reserved.