[Nagiosplug-help] Question about check_http
Eikelenboom, Hans
Heikelenboom at alphenaandenrijn.nl
Mon Jan 26 13:10:10 CET 2009
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
-----Oorspronkelijk bericht-----
Van: Thomas Guyot-Sionnest [mailto:dermoth at aei.ca]
Verzonden: zaterdag 24 januari 2009 8:00
Aan: Nagios Plugin Help List
Onderwerp: Re: [Nagiosplug-help] Question about check_http
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 23/01/09 08:07 AM, Eikelenboom, Hans wrote:
>
> Hello,
>
> I have a webpage where a publish a license count.
> Example
>
> Total Usages: 7
>
> Is it possible to check this license with check_http.
> I want to get a warning if the license has reached the limit.
> Let's say
> If the total Usages above 22 then i want to get a warning / critical
I'd try with regular expressions, i.e. match all OK strings.
Something like:
> ^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)$
If you may have garbage at the end, but should match an optional
non-number (I also removed the start of line if you have garbage on the
front):
> 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)[^0-9]?
- --
Thomas
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFJerxb6dZ+Kt5BchYRAvoYAJ9fbGVFVRlfIJWKPEMOE0z/7pZpuACfSd3X
YWuDr6W8ujRK8lj1BDalTkY=
=selM
-----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