org.opennms.netmgt.collectd
Class SnmpCollector

java.lang.Object
  extended by org.opennms.netmgt.collectd.SnmpCollector
All Implemented Interfaces:
ServiceCollector

public class SnmpCollector
extends Object
implements ServiceCollector

The SnmpCollector class ...

Author:
Matt Brozowski, OpenNMS

Field Summary
static String SNMP_STORAGE_PRIMARY
          Valid values for the 'snmpStorageFlag' attribute in datacollection-config XML file.
 
Fields inherited from interface org.opennms.netmgt.collectd.ServiceCollector
COLLECTION_FAILED, COLLECTION_SUCCEEDED, COLLECTION_UNKNOWN, statusType
 
Constructor Summary
SnmpCollector()
           
 
Method Summary
 CollectionSet collect(CollectionAgent agent, EventProxy eventProxy, Map<String,String> parameters)
          Perform data collection.
 RrdRepository getRrdRepository(String collectionName)
           
 void initialize(CollectionAgent agent, Map parameters)
          Responsible for performing all necessary initialization for the specified interface in preparation for data collection.
 void initialize(Map parameters)
          Initialize the service collector.
 void release()
          Responsible for freeing up any resources held by the collector.
 void release(CollectionAgent agent)
          Responsible for releasing any resources associated with the specified interface.
 String serviceName()
          Returns the name of the service that the plug-in collects ("SNMP").
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SNMP_STORAGE_PRIMARY

public static String SNMP_STORAGE_PRIMARY
Valid values for the 'snmpStorageFlag' attribute in datacollection-config XML file. "primary" = only primary SNMP interface should be collected and stored "all" = all primary SNMP interfaces should be collected and stored

Constructor Detail

SnmpCollector

public SnmpCollector()
Method Detail

serviceName

public String serviceName()
Returns the name of the service that the plug-in collects ("SNMP").

Returns:
The service that the plug-in collects.

initialize

public void initialize(Map parameters)
Initialize the service collector. During initialization the SNMP collector:

Specified by:
initialize in interface ServiceCollector
Parameters:
parameters - Not currently used.
Throws:
RuntimeException - Thrown if an unrecoverable error occurs that prevents the plug-in from functioning.

release

public void release()
Responsible for freeing up any resources held by the collector.

Specified by:
release in interface ServiceCollector

initialize

public void initialize(CollectionAgent agent,
                       Map parameters)
Responsible for performing all necessary initialization for the specified interface in preparation for data collection.

Specified by:
initialize in interface ServiceCollector
Parameters:
agent - Network interface to be prepped for collection.
parameters - Key/value pairs associated with the package to which the interface belongs..

release

public void release(CollectionAgent agent)
Responsible for releasing any resources associated with the specified interface.

Specified by:
release in interface ServiceCollector
Parameters:
agent - Network interface to be released.

collect

public CollectionSet collect(CollectionAgent agent,
                             EventProxy eventProxy,
                             Map<String,String> parameters)
Perform data collection.

Specified by:
collect in interface ServiceCollector
Parameters:
agent - Network interface to be data collected.
eventProxy - Eventy proxy for sending events.
parameters - Key/value pairs from the package to which the interface belongs.

getRrdRepository

public RrdRepository getRrdRepository(String collectionName)
Specified by:
getRrdRepository in interface ServiceCollector


Copyright © 2009. All Rights Reserved.