Retain Bandwidth Graph Data on ifIndex Change

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
atremblay
Posts: 46
Joined: Wed Apr 05, 2017 1:38 pm

Retain Bandwidth Graph Data on ifIndex Change

Post 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!
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Retain Bandwidth Graph Data on ifIndex Change

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
atremblay
Posts: 46
Joined: Wed Apr 05, 2017 1:38 pm

Re: Retain Bandwidth Graph Data on ifIndex Change

Post 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.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Retain Bandwidth Graph Data on ifIndex Change

Post by tmcdonald »

Glad to hear it! Are we okay to close this thread?
Former Nagios employee
Locked