Troubleshoot performance data collection from SNMP agents

troubleshooting
snmp

#1

Problem

SNMP datacollection configuration is not working.

Diagnosis

Missing SNMP service

SNMP service on interface

The SNMP service should be added to the node either directly on the requisition or through a detector.

SNMP service doesn’t come online

The SNMP credentials should be configured correctly. It’s possible to configure it using the GUI or directly in snmp-config.xml.

RRD file is not created

There a some general things which can be checked.

collectd and datacollection config needs matching collection names

  • collectd-configuration.xml: <parameter key="collection" value="NAME"/>
  • datacollection-config.xml: <snmp-collection name="NAME"/>

dataCollectionGoup has to match datacollection-group name

  • datacollection-config.xml: <include-collection dataCollectionGroup="NAME"/>
  • ${OPENNMS_HOME}/etc/datacollection/someDatacollectionFile.xml: <datacollection-group name=NAME>

sysObjectId has to match sysOidMask

In ${OPENMS_HOME}/etc/datacollection/someDatacollectionFile.xml the sysOidMask in systemDef has to match the sysObjectId of the node.

You can get these using: snmpwalk -c COMMUNITY -v2c IP -On .1.3.6.1.2.1.1.2.0

sysoid vs sysoidMask in datacollection config files

sysoid matches exactly against the SysObjectID of a node:

<sysoid>.1.3.6.1.4.1.19746.3.1.36</sysoid>

sysoidMask matches against everything starting with the defined OID:

<sysoidMask>.1.3.6.1.4.1.19746.</sysoidMask>

Collectd filter mismatch

The filter configuration in collectd-configuration.xml does not match your node.

SNMP v2 in v1

Some buggy SNMP agents fail to exclude Counter64 objects from view when responding to SNMPv1 requests (as mandated by RFC3584 § 4.2.2.1). To relax handling of v1 responses to permit Counter64 varbinds rather than discarding them as ill-formed (per the same RFC), set this property to true.


#2

To validate that the SNMP settings are configured properly, I like to use snmp:show-config 192.168.1.1 from the Karaf Shell

It’s also possible to perform SNMP walks from the shell, which use the configured SNMP settings, and the same SNMP client settings that are used when the data collection is performed: snmp:walk 192.168.1.1 .1.3.6.1.2.1.1.2

You can also invoke the SNMP collector manually and verify the results using: collection:collect --node 1 org.opennms.netmgt.collectd.SnmpCollector 192.168.1.1. Note that you must specify the node id, and the IP address specified must be on that node.


Troubleshoot data collections problems