[Nagiosplug-help] Question about check_http

Thomas Guyot-Sionnest dermoth at aei.ca
Mon Jan 26 15:32:33 CET 2009


-----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-----




More information about the Help mailing list