Fwd: Re: Monitoring HP switches
Cook, Garry
GWCOOK at mactec.com
Fri Feb 7 17:32:15 CET 2003
When I run this check I receive the following error message:
awk: cmd. line:4: if ($1 == 2) {printf("Information - <a
target=\"hp\" href=\"http://% s/nc
awk: cmd. line:4: ^ unterminated string
Just in case the fonts are misaligned during delivery, the 'unterminated
string' is pointing at the " in front of 'Information'.
I'm not really familiar with the awk command, so I'm not sure how to
troubleshoot. Any ideas?
Garry W. Cook, CCNA
Network Infrastructure Manager
MACTEC, Inc. - http://www.mactec.com/
303.308.6228 (Office) - 303.881.5157 (Mobile)
-----Original Message-----
From: Wim Fournier [mailto:wim at hsmade.com]
Sent: Friday, February 07, 2003 7:18 AM
To: wojnicki at asw.waw.pl
Cc: nagios-users at lists.sourceforge.net
Subject: Re: Fwd: Re: [Nagios-users] Monitoring HP switches
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
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
-------------------------------------------------------
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