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 didactum.xml as follows:
Name: didactum.xml
<?xml version="1.0"?>
<datacollection-group name="didactum">
<!-- didactum Resource Types -->
<resourceType name="hrElementIndex" label="Element ID">
<persistenceSelectorStrategy class="org.opennms.netmgt.collectd.PersistAllSelectorStrategy"/>
<storageStrategy class="org.opennms.netmgt.dao.support.IndexStorageStrategy"/>
</resourceType>
<!-- didactum mibs -->
<group name="didactumElements" 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="didactum EMS">
<sysoidMask>.1.3.6.1.4.1.8072.3.2.</sysoidMask>
<collect>
<includeGroup>vutlanElements</includeGroup>
</collect>
</systemDef>
</datacollection-group>
2. Enable file processing didactum.xml in opennms / etc / data collection-config.xml file
Name: 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="Didactum"/>
</snmp-collection>
</datacollection-config>
3. Create a report in opennms/etc/snmp-graph.properties:
Name: 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.didactum.elements.name=Data
report.didactum.elements.columns=hrElementValue
report.didactum.elements.type=hrElementIndex
report.didactum.elements.propertiesValues=hrElementName
report.didactum.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. The properties of the nodes in the web interface: Home / Reports / Resource Graphs / Choose select elements by ID and press Graph Selection.
Documentation: http://www.opennms.org/wiki/Collecting_SNMP_data_from_tables_with_arbitrary_indexes