Hi,
We set up monitoring for our Core 3850 Cisco switch a while ago via SNMP walk and selecting all the ports we want monitoring. Last night, we rebooted the switch after a maintenance which changes all the SNMP indexes which in-turn resulted in our Nagios instance monitoring the wrong indexes. Does Nagios use index numbers instead of interface names when monitoring switches? If so, is there any way we can configure it to use interface names? Can we make config changes to our Switch that will prevent this from happening each time we reboot our switch and index values change.
Thanks...
Monitoring Cisco 3850 switches
-
sreinhardt
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: Monitoring Cisco 3850 switches
Nagios XI uses MRTG as a backend to monitor your switches and routers. By default I believe mrtg specifically uses oids not names or interface numbers. This is something that is a known issue with cisco devices, especially ones that stack or have hot-swap add-in cards. I personally have not changed mrtg\cfgmaker flags to work with descriptions and some form of snmpwalk, but it is likely a possibility. If you would like to venture down this path, we certainly can see whats available for options. Before we go that route, did all interfaces change oids or just some of them?
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
-
pallaviraju
- Posts: 5
- Joined: Thu Jul 17, 2014 5:16 pm
Re: Monitoring Cisco 3850 switches
Thanks.. Not all OIDs changed - only some did.
-
sreinhardt
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: Monitoring Cisco 3850 switches
Yep, most likely all of the standard ports stayed the same, and addin cards\modules rotated oids. Based on this: http://oss.oetiker.ch/mrtg/doc/cfgmaker.en.html, it looks like mrtg should actually support using description or other identifiers than just what OID\interface number it is. Could you post a copy of the current /etc/mrtg/conf.d/[hostname].cfg file and download and run run the following script to send back the results for comparison.
You will need to copy off or move the /tmp/mrtgscan-[hostname\ip], as the second command will overwrite the first, and I need to see both files. You can find the mrtg-scan.sh script from:
Code: Select all
./mrtg-scan.sh -H [hostname\IP] -c [community string] -t /tmp -r name
./mrtg-scan.sh -H [hostname\IP] -c [community string] -t /tmp -r descrCode: Select all
http://assets.nagios.com/downloads/nagiosxi/scripts/mrtg-scan.shNagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
-
pallaviraju
- Posts: 5
- Joined: Thu Jul 17, 2014 5:16 pm
Re: Monitoring Cisco 3850 switches
That sounds about right. I've never heard of an ifindex shuffling around like that, but reading through the doc that sounds like exactly what you are experiencing. Bit of a weird design decision, but as long as there is a workaround...
Did you get to try that solution out? If so, did it help?
Did you get to try that solution out? If so, did it help?
Former Nagios employee
-
pallaviraju
- Posts: 5
- Joined: Thu Jul 17, 2014 5:16 pm
Re: Monitoring Cisco 3850 switches
The SNMP ifIndex persistence feature provides an interface index (ifIndex) value that is retained and used when the switch reboots. The ifIndex value is a unique identifying number associated with a physical or logical interface.
-
pallaviraju
- Posts: 5
- Joined: Thu Jul 17, 2014 5:16 pm
Re: Monitoring Cisco 3850 switches
We will try it out and let you know if it works..
-
sreinhardt
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: Monitoring Cisco 3850 switches
Please do let us know how it goes, this is something that I am very curious to see a resolution to, as its a common issue with stacked switches and switches with lots of add-on cards.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.