Yeah I'm really confused on this as well. I tried this script against an ASA 5505, software version 9.2, with my script looking like this on line 27:
Code: Select all
# Cisco IPS CPU
my $cisco_cpu_5m = "1.3.6.1.4.1.9.9.109.1.1.1.1.8.1"; # Cisco CPU load (5min %)
my $cisco_cpu_1m = "1.3.6.1.4.1.9.9.109.1.1.1.1.7.1"; # Cisco CPU load (1min %)
my $cisco_cpu_5s = "1.3.6.1.4.1.9.9.109.1.1.1.1.6.1"; # Cisco CPU load (5sec %)
#my $cisco_cpu_5m = "1.3.6.1.4.1.9.9.109.1.1.1.1.5.1"; # Cisco CPU load (5min %)
#my $cisco_cpu_1m = "1.3.6.1.4.1.9.9.109.1.1.1.1.4.1"; # Cisco CPU load (1min %)
#my $cisco_cpu_5s = "1.3.6.1.4.1.9.9.109.1.1.1.1.3.1"; # Cisco CPU load (5sec %)
According to Cisco those OIDs are for CPU stats on IOS devices 12.2 or later (this is an ASA so it uses a completely different number scheme for version numbers, so not sure what that means...), source here:
http://www.cisco.com/c/en/us/support/do ... -snmp.html
When I run the script with those particular OIDs defined I get:
Code: Select all
[root@lisl-ngos-01-pv libexec]# ./check_cisco_ips.pl -H <IP ADDRESS> -C <COMMUNITY> -2 -T cpu -w 70,50,40 -c 90,70,50
Argument "noSuchObject" isn't numeric in numeric gt (>) at ./check_cisco_ips.pl line 334.
Cisco ASA CPU : 5sec = noSuchObject %, 2min = 17 %, 5min = 16 % : OK
So it seems to work with all but the 5 sec OID for some unknown reason. When I run this script against an ASA 5510 with software version 9.1 (literally one minor revision lower) I get the "noSuchObject" issue on all 3, but when I modify the script to look like this:
Code: Select all
#my $cisco_cpu_5m = "1.3.6.1.4.1.9.9.109.1.1.1.1.8.1"; # Cisco CPU load (5min %)
#my $cisco_cpu_1m = "1.3.6.1.4.1.9.9.109.1.1.1.1.7.1"; # Cisco CPU load (1min %)
#my $cisco_cpu_5s = "1.3.6.1.4.1.9.9.109.1.1.1.1.6.1"; # Cisco CPU load (5sec %)
my $cisco_cpu_5m = "1.3.6.1.4.1.9.9.109.1.1.1.1.5.1"; # Cisco CPU load (5min %)
my $cisco_cpu_1m = "1.3.6.1.4.1.9.9.109.1.1.1.1.4.1"; # Cisco CPU load (1min %)
my $cisco_cpu_5s = "1.3.6.1.4.1.9.9.109.1.1.1.1.3.1"; # Cisco CPU load (5sec %)
I get this:
Code: Select all
[root@lisl-ngos-01-pv libexec]# ./check_cisco_ips.pl -H <IP ADDRESS> -C <COMMUNITY> -2 -T cpu -w 70,50,40 -c 90,70,50
Cisco ASA CPU : 5sec = 3 %, 2min = 3 %, 5min = 2 % : OK
All is perfect like that. So yeah...kind of at a loss for how to proceed. Is there anyway to make this particular script (or is there a different script available) that can monitor CPU usage on ASAs using either OID? Looking at Cisco's documentation, it looks like there are only 2 OIDs for each of those data points, and the difference is only based o n the software revision on the ASA. Also, why is the 5sec OID not working for the 9.2 ASA when I'm 99% sure it's correct? Also, why does the "S" in SNMP stand for "Simple" when it's anything but simple?! Yargh!