Showing posts with label snmp. Show all posts
Showing posts with label snmp. Show all posts

2009-11-12

Monitoring Cisco Wireless Controller 4400 via SNMP

Hello

Cisco has done a great job implementing SNMP into its 4400 WLC.
The sheer number of OIDs is phenomenal.

You will need two MIB files to translate OIDs from numeric into named
AIRESPACE-SWITCHING-MIB
1.3.6.1.4.1.14179.1




AIRESPACE-WIRELESS-MIB
1.3.6.1.4.1.14179.2





Both are avaible to view and download here:
http://www.oidview.com/mibs/14179/md-14179-1.html

Or from Cisco site:
http://tools.cisco.com/Support/SNMP/do/BrowseOID.do?local=en&translate=Translate&objectInput=1.3.6.1.4.1.14179


First monitor - Number of users connected to given AP

This will tell us how many people are connected to one particular Cisco Airespace Access Point

For that we only need one OID:
From table: bsnAPIfLoadParametersTable
Entry: bsnAPIfLoadNumOfClients
Numerical OID: 1.3.6.1.4.1.14179.2.2.13.1.4

And if we do a snmpwalk on it we will find that there is a bit more work to do.
Why?
Because Cisco APs connected to given controller are identified in SNMP database by a string o random values preceded by a single 0 (zero) like this: 0.31.155.25.136.80 .
Also will can see that each AP has two OIDs. One ending with ".0" other with ".1".
Thats because the APs can work in one of two modes: a/h or b/g/n.

So in order to get the correct data (via smnpget) we need to join the OIDs into one string like this:
1.3.6.1.4.1.14179.2.2.13.1.4.0.31.155.25.136.8.0

Here is an example command:
snmpget -c public 192.168.200.100 -Ovq 1.3.6.1.4.1.14179.2.2.13.1.4.0.31.155.25.136.8.0

The output would be for example:
5

The -O parameter controls output of snmpget.
  • 'v' - does not print OID string,
  • 'q' - quick print values (without the value type) - makes parsing of output much simpler
Here is a link to a Perl script I created for Nagios/Opsview:
http://www.monitoringexchange.org/inventory/Check-Plugins/Network/Cisco-AP-Client-number


Second monitor - Profile status of given AP

This will tell us the profile status of one particular Cisco Airespace Access Point

For that we need 4 OIDs:
From table: bsnAPIfProfileStateTable
1.3.6.1.4.1.14179.2.2.16.1.1
1.3.6.1.4.1.14179.2.2.16.1.2
1.3.6.1.4.1.14179.2.2.16.1.3
1.3.6.1.4.1.14179.2.2.16.1.24

The values of those OIDs are: Passed or Failed.

Word on profiles:
There are 4:
  • load   (...14179.2.2.16.1.1)
  • noise   (...14179.2.2.16.1.3)
  • interference   (...14179.2.2.16.1.2)
  • coverage   (...14179.2.2.16.1.24)
Each one is defined by set of values defined in Wireless Controller. WLC checks if those conditions ore met by an AP. If so the given profile status is passed.


Here is a link to a Perl script I created for Nagios/Opsview:
http://www.monitoringexchange.org/inventory/Check-Plugins/Hardware/Network/Network-Gear/Cisco-AP-Profile-Status


Third monitor - basic traffic information of given AP

Those OIDs will give us information on total send and receive utilization (in %) as well as channel number and its utilization. Another information that should be checked is th operations status of the AP

For that we need few more OIDs:
From table: bsnAPTable
Administrative Status: 1.3.6.1.4.1.14179.2.2.1.1.37
The value of this OID can be: 
1 - enable
2 - disable

Operational Status: 1.3.6.1.4.1.14179.2.2.1.1.6
The value of this OID can be:
1 - associated
2 - disassociating
3 - downloading 

From table: bsnAPIfLoadParametersTable
TX utilization: 1.3.6.1.4.1.14179.2.2.13.1.1
RX utilization: 1.3.6.1.4.1.14179.2.2.13.1.2
Channel utilization: 1.3.6.1.4.1.14179.2.2.13.1.3
The value of those OIDs are given in %.
There are global values of the AP (not on per client basis)
 


And the number of channel used by this AP we get from table: bsnAPIfTable
1.3.6.1.4.1.14179.2.2.2.1.4

Here is a link to a Perl script I created for Nagios/Opsview:
http://www.monitoringexchange.org/inventory/Check-Plugins/Hardware/Network/Network-Gear/Cisco-AP-Traffic

2009-08-25

How to upgrade SNMP agent on Debian Etch

Hi!

This is my first post on my very first blog.
So I ask for your understanding.
Also - I'm not a xNIX systems expert (yet) so posts regarding Linux may contain some errors.
Again - be forgiving :-)                   
(and give feedback, always give feedback!!)


OK. To the point.

I'm using SNMP to get performance data of a Linux (Debian Etch) machine. I need to get CPU usage of every core separately. Unfortunately the machine does not give out that information via SNMP.
I fixed it by upgrading SNMP agent to latest (almost) stable version.


Here are the steps I needed to take.

Check the current snmpd version installed on said box:
  • locally: 
find / -name snmpd
/usr/sbin/snmpd -v
  •  remotely:
snmpwalk -v 1 -c community_string X.X.X.X versiontag
It turned out that machine uses snmpd version 5.2.3 which is the latest version for Debian Etch.

So the only way to use newer SNMP agent on this old Debian is to compile it from source.

Download the latest stable source package of Net-Snmp:
wget http://sourceforge.net/projects/net-snmp/files/net-snmp/5.4.2.1/net-snmp-5.4.2.1.tar.gz/download

Unpack it, configure, compile and install
tar -xf  net-snmp-5.4.2.1.tar.gz
cd  net-snmp-5.4.2.1
./configure
make
make install
OOOPS! Error:
/usr/bin/ld: cannot find -lperl
It turned out that the poor Etch did not have libperl-dev (PERL development library)
So:
apt-get install libperl-dev
and than compile and install again.

After the installation disable / remove the old snmpd package:

/etc/init.d/snmpd stop
or
aptitude remove snmpd

Run the newly installed agent with old configuration file:
/usr/local/sbin/snmpd -c /etc/snmp/snmpd.conf &

Check the running processes:
 ps -ef | grep -i snmp.
(the dot at the end is a REGEXP symbol for "any single character" so that grep will filter for "snmp" and "snmpd")

And check the SNMP agent version again.
Success!

Afterword:
I use OpsView for monitoring. It a s Nagios-based open-source application. I will talk about it near future.