Sensors polling example for OpenNMS

To configure the sensors polling  in OpenNMS it is necessary to make the following changes in the configuration files:

  1. Add to directory opennms / etc / data collection file vutlan.xml as follows:

    vutlan.xml

    <?xml version="1.0"?> <datacollection-group name="vutlan"> <!-- vutlan Resource Types --> <resourceType name="hrElementIndex" label="Element ID"> <persistenceSelectorStrategy class="org.opennms.netmgt.collectd.PersistAllSelectorStrategy"/> <storageStrategy class="org.opennms.netmgt.dao.support.IndexStorageStrategy"/> </resourceType> <!-- vutlan mibs --> <group name="vutlanElements" ifType="all"> <mibObj oid=".1.3.6.1.4.1.39052.1.3.1.7" instance="hrElementIndex" alias="hrElementName" type="string" /> <mibObj oid=".1.3.6.1.4.1.39052.1.3.1.9" instance="hrElementIndex" alias="hrElementValue" type="octetstring" /> </group> <systemDef name="vutlan EMS"> <sysoidMask>.1.3.6.1.4.1.8072.3.2.</sysoidMask> <collect> <includeGroup>vutlanElements</includeGroup> </collect> </systemDef> </datacollection-group>



  2. Enable file processing vutlan.xml in opennms / etc / data collection-config.xml file

    datacollection-config.xml

    <?xml version="1.0"?> <datacollection-config rrdRepository="/opt/opennms/share/rrd/snmp/"> <snmp-collection name="default" snmpStorageFlag="select"> <rrd step="300"> <rra>RRA:AVERAGE:0.5:1:2016</rra> <rra>RRA:AVERAGE:0.5:12:1488</rra> <rra>RRA:AVERAGE:0.5:288:366</rra> <rra>RRA:MAX:0.5:288:366</rra> <rra>RRA:MIN:0.5:288:366</rra> </rrd> .. <include-collection dataCollectionGroup="Vutlan"/> </snmp-collection> </datacollection-config>



  3. Create a report in opennms/etc/snmp-graph.properties:

    snmp-graph.properties

    # do not forget to include in the list of reports reports=mib2.HCbits, mib2.bits, mib2.percentdiscards, mib2.percenterrors, \ .. mysql.key.reads, mysql.key.writes, \ vutlan.elements # report in the form of graphs report.vutlan.elements.name=Data report.vutlan.elements.columns=hrElementValue report.vutlan.elements.type=hrElementIndex report.vutlan.elements.propertiesValues=hrElementName report.vutlan.elements.command=--title="Value of '{hrElementName}'" \ DEF:elemValue={rrd1}:hrElementValue:AVERAGE \ LINE2:elemValue#0000ff:"Value " \ GPRINT:elemValue:AVERAGE:" Value \\: %8.2lf %s\\n" \



  4. Restart OpenNMS with command
    opennms restart

  5. n the properties of the nodes in the web interface: Home / Reports / Resource Graphs / Choose select elements by ID and press Graph Selection. Finally, it should look something like the picture below:

Details in the official documentation: http://www.opennms.org/wiki/Collecting_SNMP_data_from_tables_with_arbitrary_indexes