Fwd: Re: Monitoring HP switches

Wim Fournier wim at hsmade.com
Sat Feb 8 21:31:00 CET 2003


Pawel Wojnicki zei:
> Thanks
> You wouldn't have anything for HP procurve 9304M?
> I get a 404 not found on this one.
> Does it work on  HP procurve 4000?

I wrote it for the procurve 2524.
but, i found it out like this:

I extracted the class file off the 'status lamp' in the webgui for the
switch. If you dont have the status lamp, it wont work anyhow ;( Then I
decompiled the class file into Java and looked up how they extracted the
status info from the switch as the class is run on the workstation. I found
an URL in the java code that was requested for. So I requested it on my
browser and found some numbers which should represent the status. I found
that one number was for the actual status (OK,WARNING, CRITICAL, etc) and
an other for the reference to the explanation page. So I tested it by
disconnecting a cable (warning) and by generating some other errors (like
with security). Thats how I found out how to query for the status. The
actual link to the status explanation consists of an URL with, as cgi
parameter, the error number stated in the status page.

If you found anything, please let me and the list know.

good luck! ;o)

>
> Pawel
>
> At 15:17 03-02-07 +0100, you wrote:
>>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]



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