Page 1 of 1

Retain Bandwidth Graph Data on ifIndex Change

Posted: Mon Sep 11, 2017 12:54 pm
by atremblay
Hi board!

Background
So I have several Cisco 3850 Switches in stack formation. When they reboot because it's first come first serve into the stack the SNMP OIBs index each switch in order which they enter the stack. So what happens is you have different SNMP ifIndex number for many of the interfaces. In Nagios, what used to be TE3/0/4 is now G4/0/17. This causes interfaces to appear to be down when they are not, and the data you retain on your bandwidth chart becomes not accurate.

So far...
So far I've fixed the ifIndex on that UP/DOWN status of the interfaces. That was easy. Change the ifIndex in the config lines:

Code: Select all

check_xi_service_ifoperstatus!COMMUNITY!ifIndex!-v 2 -p 161
COMMUNITY = Community Name
ifIndex = ifIndex OID number
Use an snmpwalk to find the ifIndex and change it in the above config lines.

I've also gone to the devices and enabled the ifIndex persistence feature. On Cisco IOS and IOS-XE global config:

Code: Select all

snmp-server ifindex persist
This will make it build a file kept in nvram (dir nvram:) holding the index to interface relationship, and on reload will ensure current interfaces keep their indexes.

Question
Next is to fix the bandwidth I'm keeping track of. Because if I build new, then I loose all my historical information. Or worse, I have to retain them as old services, disable notifications and let them be red all the time. Yuck! No thanks.
But there's no way it would be as easy as changing the ifIndex right?

Code: Select all

check_xi_service_mrtgtraf!ipaddress_ifIndex.rrd!850.0,850.0!925.0,925.0!M
ipaddress = ip address of device
ifIndex = ifIndex OID number
Do you know how I would be able to get the new ifIndex number for the right interfaces in there and retain my old historical bandwidth?

Thanks community!

Re: Retain Bandwidth Graph Data on ifIndex Change

Posted: Mon Sep 11, 2017 4:35 pm
by tgriep
There is a Tool you can install on the Nagios XI server to Merge the old performance data in to the new check. The link below is where you can download it.
https://exchange.nagios.org/directory/A ... ol/details
After it is installed, you would go to the Tools menu to access it and in the tool are some examples but I think you would want to use Merge to get the historical data in to the new check.

Re: Retain Bandwidth Graph Data on ifIndex Change

Posted: Tue Sep 12, 2017 5:15 pm
by atremblay
Good choice. This tool works great. A bit cumbersome and takes some of your time to do the work. But it eventually gets you to merge the data and delete the old ones to clean up your server. Thanks for the suggestion.

Re: Retain Bandwidth Graph Data on ifIndex Change

Posted: Wed Sep 13, 2017 9:06 am
by tmcdonald
Glad to hear it! Are we okay to close this thread?