[Nagiosplug-help] Output of check_http not consistent
Thomas Guyot-Sionnest
dermoth at aei.ca
Wed May 23 03:51:50 CEST 2007
On 22/05/07 11:40 AM, Ingo Lantschner wrote:
> Am 22.05.2007 um 15:53 schrieb Matthias Eble:
>
>> But it wouldn't get confused if it used perfdata instead of the
>> plugin output. Thus plugin output is for human beings, perfdata for
>> computers :)
> good point! So let me paste the whole output:
> HTTP OK HTTP/1.1 200 OK - 1227 bytes in 0.067 seconds |
> time=0.066948s;;;0.000000 size=1227B;;;0
> OK - HTTP/1.1 302 Found - 0.723 second response time |
> time=0.723189s;;;0.000000 size=365B;;;0
>
> So first the standard map-file *does* get confused, since it is
> searching for a line starting with "HTTP" - a pattern which does not
> always fit as we can see. And second: Are you sure, that the time in
If you get the data from Nagios there's a macro that gives you only the
perfdata part. If you have no choice but use the full output, then you
should discard anything before the first pipe (including the pipe
itself) and any whitespace after it. The perfdata specifications are
explained in details here:
http://nagiosplug.sourceforge.net/developer-guidelines.html#AEN202
> both cases is measuring a comparable process/roundtrip? I do not want
> to compare apples with horses (don't know the English expression for
> "Birne" right now :-) ).
The first check you did is on localhost, so you can expect much faster
response times. For the 302 case, all you got is the redirect reply from
the web server. It's OK if all you want to know is that the specific web
server you're testing answers, but that doesn't mean the actual page
will work.
To test the final page you can add "-f follow" to your arguments. Note
that follow will not work if the redirect change between http and https
(see bug #1506121 - check_http problem with protocol change in redirect).
Hope this helps,
Thomas
More information about the Help
mailing list