Cisco Catalyst 2970 monitoring via SNMP

von Mario Rasser

This article will explain some parts of monitoring a Cisco Catalyst 2970 switch via SNMP and Nagios. Together with NagiosGrapher it gets an powerful combination to have a longtime overview about that device and you can create nice graphics like that:


Prepare the switch for SNMP requests from a SNMP polling host (here :

access-list 60 permit
snmp-server community yoursnmpcommunitystring RO 60
snmp-server location "near the backbone"
snmp-server contact ""

Play around with SNMP

First install snmp and get the CISCO-MIBS and install them on your system (optional).

aptitude install snmp
cd /tmp/

Extract the needed MIBS from the v2.tar.gz, e.g. to /usr/share/snmp/mibs/ Maybe you’ve to have a look in the files dependencies.

Get some Status information from the ENVMON mib:

snmpwalk -m CISCO-ENVMON-MIB -v2c -OS -c  yoursnmpcommunitystring switch-fqdn .
CISCO-ENVMON-MIB::ciscoEnvMonPresent.0 = INTEGER: 100
CISCO-ENVMON-MIB::ciscoEnvMonFanStatusDescr.1004 = STRING: Switch#1, Fan#1, Status is Normal
CISCO-ENVMON-MIB::ciscoEnvMonFanState.1004 = INTEGER: normal(1)
CISCO-ENVMON-MIB::ciscoEnvMonSupplyStatusDescr.1003 = STRING: Switch#1, PowerSupply#1, Status is Normal, RPS Not Present
CISCO-ENVMON-MIB::ciscoEnvMonSupplyState.1003 = INTEGER: normal(1)
CISCO-ENVMON-MIB::ciscoEnvMonSupplySource.1003 = INTEGER: ac(2)
CISCO-ENVMON-MIB::ciscoEnvMonEnableShutdownNotification.0 = INTEGER: false(2)
CISCO-ENVMON-MIB::ciscoEnvMonEnableTemperatureNotification.0 = INTEGER: false(2)
CISCO-ENVMON-MIB::ciscoEnvMonEnableFanNotification.0 = INTEGER: false(2)
CISCO-ENVMON-MIB::ciscoEnvMonEnableRedundantSupplyNotification.0 = INTEGER: false(2)
CISCO-ENVMON-MIB::ciscoEnvMonEnableStatChangeNotif.0 = INTEGER: false(2)

.. as you can see you can get health information like PowerSupply and FanStatus informations. We can use these SNMP values in Nagios to monitor the PSU and Fan status.

You can find further informations about the CISCO Enterprise SNMP tree here.

Looking around in the tree, you will find many information that you want to monitor.

Professional Linux, Network and Monitoring support

Kommentare sind geschlossen.

© 2003-2021 Fa. ipunct - IT-Lösungen auf den Punkt gebracht