Fwd: Re: Monitoring HP switches

Wim Fournier wim at hsmade.com
Fri Feb 7 15:17:51 CET 2003


Well here you go:
------------8<-----------------------
#!/bin/bash
# This check checks a HP procurve 2524 webgui for events
# Returns a link to the event found
# Author: Wim Fournier (wim at kern.nl)
# $0 ip-address
test -n $1 || exit
export IP=$1

wget --http-user= --http-passwd=******* http://$IP/cgi/fflog?action=status -
O -
 2>/dev/null | awk -F~ '{
        if ($1 == 1) {print "OK";exit 0;}
        if ($1 == 2) {printf("Information - <a target=\"hp\" href=\"http://%
s/nc
fw_b.html?index=%d\">%s</a>\n",ENVIRON["IP"],$2,$3); exit 1; }
        if ($1 == 3) {printf("Non-critical - <a target=\"hp\"
href=\"http://%s/n
cfw_b.html?index=%d\">%s</a>\n",ENVIRON["IP"],$2,$3); exit 1; }
        if ($1 == 4) {printf("Critical - <a target=\"hp\" href=\"http://%
s/ncfw_
b.html?index=%d\">%s</a>\n",ENVIRON["IP"],$2,$3); exit 1; }
print "Unknown"; exit -1;
}'
------------8<-----------------------

Its based on a file that resides on the webserver of the switch with the
status in it.

Pawel Wojnicki zei:
> Hey sure - I'd appreciate any help and info
>
> Pawel
>
>>Date: Fri, 7 Feb 2003 14:21:27 +0100 (CET)
>>Subject: Re: [Nagios-users] Monitoring HP switches
>>From: "Wim Fournier" <wim at hsmade.com>
>>To: <wojnicki at asw.waw.pl>
>>Importance: Normal
>>Reply-To: wim at hsmade.com
>>X-Mailer: SquirrelMail (version 1.2.5)
>>X-Spam-Status: No, hits=-3.1 required=5.0 tests=IN_REP_TO,MAY_BE_FORGED
>> version=2.20
>>X-Spam-Level:
>>
>>Pawel Wojnicki zei:
>> > Does anyone here have any experience in monitoring HP ethernet
>> > switches?  I  figure you have to use check_snmp, but couldn't find
>> > anything further in  the faq or fm.
>>
>>even better, i hacked myself through the web management page and found
>>a way to check for the status lamp in the left upper corner and create
>>a link in the status field to the page with the error (if existant)
>>
>>contact me if you want it, it should be also somewhere on sourceforge
>>as patch.. but can't remember where
>> >
>> > Pawel
>> >
>> >
>> >
>> > -------------------------------------------------------
>> > This SF.NET email is sponsored by:
>> > SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
>> > http://www.vasoftware.com
>> > _______________________________________________
>> > Nagios-users mailing list
>> > Nagios-users at lists.sourceforge.net
>> > https://lists.sourceforge.net/lists/listinfo/nagios-users
>>
>>
>>
>>Grtz,
>>
>>Wim Fournier
>>wim at hsmade.[com|net|org]



Grtz,

Wim Fournier
wim at hsmade.[com|net|org]




-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com




More information about the Users mailing list