Thanks! I got it working now.<br><br><br><div><span class="gmail_quote">2006/1/19, Hugo van der Kooij <<a href="mailto:hvdkooij@vanderkooij.org">hvdkooij@vanderkooij.org</a>>:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On Thu, 19 Jan 2006, Toto Capuccino wrote:<br><br>> I try to check that our Outlook Web Access server is up and running so i<br>> defined my commands check_http like this:<br>> # 'check_http' command definition<br>
> define command{<br>>         command_name    check_http<br>>         command_line    $USER1$/check_http -H $HOSTNAME$ -u $ARG1$<br>>         }<br>> and services this way :<br>> check_command      check_http!rcorpsv04!http://www.rmkmail.com
<br>><br>> i get in return [1137662549] SERVICE ALERT:<br>> rcorpsv04;HTTP;WARNING;HARD;3;HTTP WARNING: HTTP/1.1 400 Bad Request<br>><br>> It looks like it's missing a host header field, how can i solve this ?
<br><br>You use an incorrect URL. The manual said:<br> -u, --url=PATH<br>   URL to GET or POST (default: /)<br><br>What is more I am puzzled why it did not complain about the fact that you<br>send 2 variables and handle only the first.
<br><br>It should be more like:<br><br>define command{<br>        command_name    check_http_url<br>        command_line    $USER1$/check_http -H $ARG1$ -u $ARG2$<br>        }<br><br>check_http_url!aragorn!/icons/powered_by_fedora.png
<br><br>This will resul in 'aragorn' being used for the host header<br><br>Hugo.<br><br>--<br>        I hate duplicates. Just reply to the relevant mailinglist.<br>        <a href="mailto:hvdkooij@vanderkooij.org">hvdkooij@vanderkooij.org
</a>                <a href="http://hvdkooij.xs4all.nl/">http://hvdkooij.xs4all.nl/</a><br>                Don't meddle in the affairs of magicians,<br>                for they are subtle and quick to anger.<br><br><br>-------------------------------------------------------
<br>This SF.net email is sponsored by: Splunk Inc. Do you grep through log files<br>for problems?  Stop!  Download the new AJAX search engine that makes<br>searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
<br><a href="http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642">http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642</a><br>_______________________________________________
<br>Nagios-users mailing list<br><a href="mailto:Nagios-users@lists.sourceforge.net">Nagios-users@lists.sourceforge.net</a><br><a href="https://lists.sourceforge.net/lists/listinfo/nagios-users">https://lists.sourceforge.net/lists/listinfo/nagios-users
</a><br>::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.<br>::: Messages without supporting info will risk being sent to /dev/null<br></blockquote></div><br>