[Nagiosplug-help] Question about check_http

Eikelenboom, Hans Heikelenboom at alphenaandenrijn.nl
Mon Jan 26 16:07:36 CET 2009


Thanks 

Finally I got it work

I use a other check_http.
Now I can set warning or critical status depending on the page content.
And also I got it worked with check_http 

Thanks for your support.


-----Oorspronkelijk bericht-----
Van: Thomas Guyot-Sionnest [mailto:dermoth at aei.ca] 
Verzonden: maandag 26 januari 2009 15:33
Aan: Nagios Plugin Help List
Onderwerp: Re: [Nagiosplug-help] Question about check_http

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 26/01/09 07:10 AM, Eikelenboom, Hans wrote:
> Thanks for your input.
> 
> I have tried this but it don't work
> If I do a grep of the page I get the following output.
> 
>  <b>Total Usages:  17</b>
> 
> I tried the following check.
> 
>  ./check_http -H Servername -p 3999 -s "Total Usages:
> ^(0|1|2|3|4|5|6|7|8|9#10|11|12|13|14|15|16|17|18|19|20|21|22)$" 
> 
> I got the following output.
> 
> HTTP CRITICAL - string not found|time=0.034701s;;;0.000000 
> size=11859B;;;0

The caret (^) match for the beginning of the line. Remove it.

Also be sure to match the right amount of spaces between the string and
the number. if it's variable, you'll have to use one of these two syntax
for the string (depending on whenever it understand Perl gegex or only
normal regexes):

\s+
[[:space:]]+

The perlre and re_syntax manpages have more details on perl regex and
regular expressions respectively.

- --
Thomas
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFJfcmB6dZ+Kt5BchYRAv59AKCxT2dt6x+l03AlTE+QTCD5oWstnACgtQGu
2KvgC1nv7hGA5y7fL3DccSU=
=ElI+
-----END PGP SIGNATURE-----

------------------------------------------------------------------------
------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Nagiosplug-help mailing list
Nagiosplug-help at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagiosplug-help
::: Please include plugins version (-v) and OS when reporting any issue.

::: Messages without supporting info will risk being sent to /dev/null




More information about the Help mailing list