Search All Sites
Nagios Live WebinarsLet our experts show you how Nagios can help your organization.
- Nagios 1.x
- Nagios 2.x
- Nagios 3.x
- Nagios 4.x
- Nagios XI
The plugin displays:
hostname, model, IOS version, serial number, snmp location, snmp contact"
The script utputs a string with:
(The formatting of this string can easily be modified at the bottom of this script).
The string can then be used by some external system or just as information as is.
Logical devices in a stack or cluster configuration will output one row of information per physical device.
This script was wtitten for Op5 in order to populate a database for device inventory consisting of more than 2000 Cisco network devices.
Add this script as a service check in Op5/Nagios for a Cisco device.
Apply the SNMP authentication information as variables to the service.
The check will always return OK, even if the host is down.
The script is a shell script that uses snmpget.
It should be fairly portable.
Tested with: 6500, ASR and other routers, different Catalyst, Nexus...
2.1 2016-06-08 Replaced the OID for Nexus model.
2.0 2015-10-27 Cleanups, more error handling and support for C3850
1.0 2015-08-19 Initial public release with some added comments and a new name.
2015-06-08 Added support for stacks bigger than 4
2015-05-22 Added support for some old ASR version.
2014-11-07 Updated the logic for model 4500.
2014-11-05 Added Cisco 4500 VSS logic to get serial of switch2.
2014-10-23 Fixed a bug with Nexus serial.
2014-10-14 Added section for Cisco WS-6500, and handling of SNMP error.
2014-04-16 First version.
You need to enable SNMP on your Cisco devices. Either SNMP version 3, 2c or 1.
Then copy this script to your Nagios Core server and add it as a service to your Cisco devices in Nagios.
I recommend reading this: