Cisco Catalyst 2970 monitoring via SNMP

23.03.2009
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:

switch_gigabitethernet0_10_1current

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

access-list 60 permit 192.168.200.200
snmp-server community yoursnmpcommunitystring RO 60
snmp-server location "near the backbone"
snmp-server contact "admin@myswitch.de"

Play around with SNMP

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

aptitude install snmp
cd /tmp/
wget ftp://ftp.cisco.com/pub/mibs/v2/v2.tar.gz

Extract the needed MIBS from the v2.tar.gz, e.g. CISCO-ENVMON-MIB.my to /usr/share/snmp/mibs/CISCO-ENVMON-MIB.my. 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 .1.3.6.1.4.1.9.9.13
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-2017 Fa. ipunct - IT-Lösungen auf den Punkt gebracht