6500 module check plugin


#1

Hi,
I have an question.
I try to use this plug-in with monitors 6500 and 4500 cisco devices.
http://exchange.nagios.org/directory/Plugins/Hardware/Network-Gear/Cisco/Cisco-6500-and-4500-Module-Check/details
I monitor several switches (6509) and i`m not getting this plug-in working.
Now i know this plug-in in build in the time of Nagios 2.x
now is was wondering if a 2.x version plug-in also works on 3.x?
Is it hard to convert it to the new nagios version?

i hope that someone can help me with this.

Thx in advanced


#2

The check is just a simple bash shell script, so the version of Nagios shouldn’t matter.

What kind of error are you getting?
Do you have snmpwalk installed?
Is snmpwalk at /usr/bin/snmpwalk? Or did you modify the check to reference the correct location?


#3

Hi,
Wel it is very strange.
If i run this command

./check_cisco_modules.sh -H 10.xxx.xxx.xxx -C public

the output on one of the switches gives

./check_cisco_modules.sh: line 29: : T: integer expression expected ./check_cisco_modules.sh: line 29: : T: integer expression expected ./check_cisco_modules.sh: line 29: : T: integer expression expected ./check_cisco_modules.sh: line 29: : T: integer expression expected ./check_cisco_modules.sh: line 29: : T: integer expression expected ./check_cisco_modules.sh: line 29: : T: integer expression expected ./check_cisco_modules.sh: line 29: : T: integer expression expected ./check_cisco_modules.sh: line 29: : T: integer expression expected OK - No Bad Modules [root@srv libexec]#

So it looks like it runs ok but with errors.

on the other switch is gives this error

Timeout: No Response from 10.xxx.xxx.xxx ./check_cisco_modules.sh: line 25: : : integer expression expected OK - No Bad Modules[root@srv libexec]#

So what could be wrong

Thx for helping me


#4

May be the code of that part is handy to show…

[code]monitor_devices()
{

num_of_modules=`/usr/bin/snmpwalk -v 2c -c $community $hostname 1.3.6.1.2.1.47.1.1.1.1.13.1 | cut -c53` 

x=1

while  "$x" -ne "$num_of_modules" ]     --------------------Rule #25
do
	module_status$x]=`/usr/bin/snmpwalk -v 2c -c $community $hostname 1.3.6.1.4.1.9.9.117.1.2.1.1.2."$x"000 |  cut -c52`
	
	if  ${module_status$x]} -ne 2 ]-----------------------Rule #29
	then
		#Service is Critical and needs to be set to Critical in Nagios
		nagios_status=2

	fi	

	((x += 1))
done

}[/code]