check temperature on Cisco 4500

Oct 11, 2005 1 Replies

Hi all,



I'm looking for a sample script to check the temperatures from our Cisco



4500 Switches via snmp.

I want to include this feature into Nagios Version 2.0b3 running on FreeBSD 5.4-STABLE.



thanks in advance Richard


In article , Richard Gliebe wrote: :I'm looking for a sample script to check the temperatures from our Cisco :4500 Switches via snmp.

:I want to include this feature into Nagios Version 2.0b3 running on :FreeBSD 5.4-STABLE.

I don't know anything about Nagios, but try something like

#!/bin/ksh # check parameters USAGE="Usage: $0 IP in|out" [[ $# -ne 2 ]] && echo $USAGE >&2 && exit 1 IP=$1; shift [[ "$1" != in && "$1" != out ]] && echo $USAGE >&2 && exit 1

# choose the last component of the OID according to intake / exhaust [[ "$1" = in ]] && SubOID=1 || SubOID=2

# if the SNMPCOMMUNITY environment variable does not have anything in it, # assume the community is "public" PROBESNMPCOMMUNITY=${SNMPCOMMUNITY:-public}

# get the appropriate value # the -Oq means remove the type information # the -Ov means do not put the OID into the result snmpget -c $PROBESNMPCOMMUNITY -Oq -Ov $IP .1.3.6.1.4.1.9.9.13.1.3.1.3.$SubOID

# Note that we just allowed the output to go to stdout. The calling # routine is assumed to have its own way of capturing the output.

# Also note: the output will be in Celcius.

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required