Fixed
Details
Assignee
Alex MayAlex MayReporter
Sriraag SridharSriraag SridharHB Grooming Date
Feb 09, 2023HB Backlog Status
Refined BacklogFD#
1568Components
Sprint
NoneFix versions
Affects versions
Priority
High
Details
Details
Assignee
Alex May
Alex MayReporter
Sriraag Sridhar
Sriraag SridharHB Grooming Date
Feb 09, 2023
HB Backlog Status
Refined Backlog
FD#
1568
Components
Sprint
None
Fix versions
Affects versions
Priority
PagerDuty
PagerDuty
PagerDuty
Created February 1, 2023 at 7:33 AM
Updated March 28, 2023 at 4:16 PM
Resolved March 28, 2023 at 4:16 PM
SNMP Interfaces Endpoint returns multiple values [duplicates] when there are multiple "IP Interfaces" pointing to same SNMP-IfIndex "ipAdEntIfIndex".
If you notice, the IfIndex for Vlan5 is "118" and from the below snmpwalk the IPs [10.98.207.34 and 10.99.19.28 and 160.178.5.252] are all tagged to IfIndex "118" which belongs to "Vlan5".
Which causes 3 entries in IPInterface table for each IP and 1 entry in SNMP Interface table [reference screenshot attached]
[sriraag@sriraag-mer-onms ~]$ snmpwalk -v 2c -c wirelessmod2 10.2.0.1:1199 -On ifdescr | grep -i 'vlan5$' .1.3.6.1.2.1.2.2.1.2.118 = STRING: Vlan5 [sriraag@sriraag-mer-onms ~]$ [sriraag@sriraag-mer-onms ~]$ [sriraag@sriraag-mer-onms ~]$ snmpwalk -v 2c -c wirelessmod2 10.2.0.1:1199 ipAdEntIfIndex | grep -i '118$' IP-MIB::ipAdEntIfIndex.10.98.207.34 = INTEGER: 118 IP-MIB::ipAdEntIfIndex.10.99.19.28 = INTEGER: 118 IP-MIB::ipAdEntIfIndex.160.178.5.252 = INTEGER: 118
Now the issue is, when making calls to snmpinterface endpoint or using HELM's Entity Datasource to get snmpinterface information we get duplicate snmp interface infromation.
Since there are Multiple IPAddresses pointing to the same IfIndex, the API Call/ Entity Datasource shows multiple SNMP Interface entries. [When we query based on the ID/Index since they have multiple ip’s pointing to same snmpifindex causing duplicate SNMP ifIndex ]
Honestly, I am not 100% sure if the SNMP Interface Endpoint or Entity Datasource, should return only one snmp interface value even if there are multiple IP’s pointing to the same ifindex, but given we are not displaying IPAddress information here [On Entity Datasource for SNMP Interface/ API Endpoint], I would probably be inclined towards SNMP Interface information returned should be unique despite the Mutiple IP’s referencing the same IfIndex. [Let me know your thoughts]
Below I've attached a output of one such call made to “
http://localhost:8980/opennms/api/v2/snmpinterfaces
" endpoint.{ "request": { "server": { "id": "f02a93e323215b9aa7abd413ce294399", "name": "ANZ OpenNMS Entities", "url": "/api/datasources/proxy/2", "auth": null, "metadata": { "version": { "version": "2021.1.9", "dv": "2021.1.9" }, "type": { "id": 2, "label": "MERIDIAN" }, "ticketerConfig": { "plugin": null, "enabled": false } } }, "params": { "limit": "0", "_s": "id==18789" }, "method": "GET", "url": "api/datasources/proxy/2/api/v2/snmpinterfaces", "hideFromInspector": false, "timeout": 10000 }, "response": { "offset": 0, "count": 3, "totalCount": 3, "snmpInterface": [ { "id": 18789, "ifType": 53, "ifAlias": "### NOTMNG ### :Connected to LAN Management Interface", "ifIndex": 118, "lastCapsdPoll": 1670545469910, "hasFlows": false, "hasIngressFlows": false, "hasEgressFlows": false, "lastIngressFlow": null, "lastEgressFlow": null, "ifDescr": "Vlan5", "ifName": "Vl5", "physAddr": "d4e880aa97c7", "ifSpeed": 1000000000, "ifAdminStatus": 1, "ifOperStatus": 1, "lastSnmpPoll": null, "collectionUserSpecified": false, "collectFlag": "C", "pollFlag": "N", "collect": true, "poll": false }, { "id": 18789, "ifType": 53, "ifAlias": "### NOTMNG ### :Connected to LAN Management Interface", "ifIndex": 118, "lastCapsdPoll": 1670545469910, "hasFlows": false, "hasIngressFlows": false, "hasEgressFlows": false, "lastIngressFlow": null, "lastEgressFlow": null, "ifDescr": "Vlan5", "ifName": "Vl5", "physAddr": "d4e880aa97c7", "ifSpeed": 1000000000, "ifAdminStatus": 1, "ifOperStatus": 1, "lastSnmpPoll": null, "collectionUserSpecified": false, "collectFlag": "C", "pollFlag": "N", "collect": true, "poll": false }, { "id": 18789, "ifType": 53, "ifAlias": "### NOTMNG ### :Connected to LAN Management Interface", "ifIndex": 118, "lastCapsdPoll": 1670545469910, "hasFlows": false, "hasIngressFlows": false, "hasEgressFlows": false, "lastIngressFlow": null, "lastEgressFlow": null, "ifDescr": "Vlan5", "ifName": "Vl5", "physAddr": "d4e880aa97c7", "ifSpeed": 1000000000, "ifAdminStatus": 1, "ifOperStatus": 1, "lastSnmpPoll": null, "collectionUserSpecified": false, "collectFlag": "C", "pollFlag": "N", "collect": true, "poll": false } ] } }