Retain Bandwidth Graph Data on ifIndex Change
Posted: Mon Sep 11, 2017 12:54 pm
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:
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:
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?
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!
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 161ifIndex = 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 persistQuestion
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!MifIndex = 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!