Description

This article provides a work-around for correcting the error condition.

Symptoms

IF-MIB resource graph data is not visible under Network Monitoring 

Solution

Note: The ifTable and ifXTable OIDs are collected by default. The interfaces table is inventory data that is pulled into the database and is available on the node details screen. The OIDs listed for the errors/discards are part of the default mib2-interface-errors collection group, and should be collected and graphed out of the box for all interfaces that are flagged for collection. So we don’t have to compile IF-MIB data collection group separately and its already a part of MIB2.xml data-collection group. Please find below URL for default oid’s which is mentioned under mib2.xml datacollection file. 


Reference URL: 

https://github.com/OpenNMS/opennms/blob/772e40f6a760b7a484c61310bb8c1239a193d6ff/opennms-base-assembly/src/main/filtered/etc/datacollection/mib2.xml#L40


Example: Lets say if we wanted to generate resource graph for below interested KPOID, which is already part for mib2.xml data-collection file 

  <group name="mib2-interface-errors" ifType="all">
     <mibObj oid=".1.3.6.1.2.1.2.2.1.13" instance="ifIndex" alias="ifInDiscards" type="counter"/>
     <mibObj oid=".1.3.6.1.2.1.2.2.1.14" instance="ifIndex" alias="ifInErrors" type="counter"/>
     <mibObj oid=".1.3.6.1.2.1.2.2.1.19" instance="ifIndex" alias="ifOutDiscards" type="counter"/>
     <mibObj oid=".1.3.6.1.2.1.2.2.1.20" instance="ifIndex" alias="ifOutErrors" type="counter"/>
  </group>

 

Please find the below mib2.xml data-collection output for your reference 

[root@space-005056a9e845 snmp-graph.properties.d]# pwd
/opt/opennms/etc/snmp-graph.properties.d

[root@space-005056a9e845 snmp-graph.properties.d]# cat mib2-graph.properties | grep mib2.discards -A40
mib2.discards, \
mib2.errors, \
report.mib2.discards.name=Discards In/Out
report.mib2.discards.columns=ifInDiscards,ifOutDiscards
report.mib2.discards.type=interfaceSnmp
report.mib2.discards.command=--title="Discards In/Out" \
--vertical-label="Discarded packets" \
DEF:octIn={rrd1}:ifInDiscards:AVERAGE \
DEF:octOut={rrd2}:ifOutDiscards:AVERAGE \
CDEF:octOutNeg=0,octOut,- \
AREA:octIn#ef2929 \
LINE1:octIn#cc0000:"In " \
GPRINT:octIn:AVERAGE:"Avg \\: %8.2lf %s" \
GPRINT:octIn:MIN:"Min \\: %8.2lf %s" \
GPRINT:octIn:MAX:"Max \\: %8.2lf %s\\n" \
AREA:octOutNeg#fcaf3e \
LINE1:octOutNeg#f57900:"Out" \
GPRINT:octOut:AVERAGE:"Avg \\: %8.2lf %s" \
GPRINT:octOut:MIN:"Min \\: %8.2lf %s" \
GPRINT:octOut:MAX:"Max \\: %8.2lf %s\\n"
report.mib2.errors.name=Errors In/Out
report.mib2.errors.columns=ifInErrors,ifOutErrors
report.mib2.errors.type=interfaceSnmp
report.mib2.errors.command=--title="Errors In/Out" \
--vertical-label="Errant packets" \
DEF:octIn={rrd1}:ifInErrors:AVERAGE \
DEF:octOut={rrd2}:ifOutErrors:AVERAGE \
CDEF:octOutNeg=0,octOut,- \
AREA:octIn#f57900 \
LINE1:octIn#cc0000:"In " \
GPRINT:octIn:AVERAGE:"Avg \\: %8.2lf %s" \
GPRINT:octIn:MIN:"Min \\: %8.2lf %s" \
GPRINT:octIn:MAX:"Max \\: %8.2lf %s\\n" \
AREA:octOutNeg#fcaf3e \
LINE1:octOutNeg#f57900:"Out" \
GPRINT:octOut:AVERAGE:"Avg \\: %8.2lf %s" \
GPRINT:octOut:MIN:"Min \\: %8.2lf %s" \
GPRINT:octOut:MAX:"Max \\: %8.2lf %s\\n"

[root@space-005056a9e845 datacollection]# pwd
/opt/opennms/etc/datacollection

[root@space-005056a9e845 datacollection]# cat mib2.xml | grep mib2-interface-errors -A5
  <group name="mib2-interface-errors" ifType="all">
     <mibObj oid=".1.3.6.1.2.1.2.2.1.13" instance="ifIndex" alias="ifInDiscards" type="counter"/>
     <mibObj oid=".1.3.6.1.2.1.2.2.1.14" instance="ifIndex" alias="ifInErrors" type="counter"/>
     <mibObj oid=".1.3.6.1.2.1.2.2.1.19" instance="ifIndex" alias="ifOutDiscards" type="counter"/>
     <mibObj oid=".1.3.6.1.2.1.2.2.1.20" instance="ifIndex" alias="ifOutErrors" type="counter"/>
  </group>

[root@space-005056a9e845 etc]# cat datacollection-config.xml | grep -i mib2
     <include-collection dataCollectionGroup="MIB2"/>

 

The following procedure will helps you to generate interested OID resource graphs.

Step 1: Need to make sure that snmp-colleciton is unselected for IF-MIB then need to remove datacollection file for IF-MIB.xml file from UI if it is already complied for data collection. 

a) Network Monitoring -> Admin -> Snmp Collection -> Default SNMP collection -> remove IF-MIB collection then save it. 

b) Network Monitoring -> Admin -> Manage SNMP Collections and Data Collection Groups -> Data Collection Groups -> Search for IF-MIB.xml data collection group file > then Remove selected data collection file. 

Step 2: You can verify, mentioned OID’s is already a part of mib2.xml file through /opt/opennms/etc/datacollection/mib2.xml file

Step 3: Verify that IF-MIB related files are removed from datacollection and snmp-graph propertires.d folder. 

Step 4: Restart OpenNMS from UI 

Administration -> Application -> right click on Network Management Application -> select Manage services -> restart opennnms 

Step 5: Once OpenNMS restarted, redirect to OpenNMS nodes list resource graph then selected specific interface under SNMP interface data -> example: ae1.1 ([ULINK]CHI-LAF-TVCO-02_AE1_MPLS, 10.68.252.85) -> then select required resource graph. 

 

Note : If you face any further issues, please contact JUNIPER JTAC Support for assistance.

 

Modification History

2024-04-05 : Article Created