check_http -s
Sean McAfee
smcafee at collaborativefusion.com
Fri May 8 18:00:14 CEST 2009
Proskurin Kirill wrote:
> Sean McAfee wrote:
>> Proskurin Kirill wrote:
>>> Hello all.
>>>
>>> I try to add a check_http with expecting some word in a body.
>>> But:
>>>
>>>
>>> ./check_http -v -H example.com -u /some.jsp -P -s=ERROR
>>>
>>> BUT it must be ERROR - not ok.
>>> What I do wrong?
>> The "-s=ERROR" is being POSTed because you're missing an argument for
>> -P, making Nagios interpret the rest as the required string for -P.
>
> I do not understand you right...
> I try to explain more detail.
>
> On some site works some jsp what check inner logic of site and return in
> body OKEY or ERROR.
>
> I what to make a check_http and IF i got in page body word "ERROR" -
> then make check critical IF in page body i got "OKEY" - return OK.
>
> As I understand -s= - it is what I expect in page body.
>
> Or I not understand it right? :-)
No, you're right about -s, but you command is being parsed as:
./check_http -v -H example.com -u /some.jsp -P "-s=ERROR"
because you're missing an argument for the -P flag.
Change it to:
./check_http -v -H example.com -u /some.jsp -s=ERROR
and it will work as you expect.
--
Sean McAfee
System Engineer
------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
More information about the Users
mailing list