He's not using host headers in his definition.<div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Nov 20, 2012 at 12:05 AM, Joerg Linge <span dir="ltr"><<a href="mailto:pitchfork@ederdrom.de" target="_blank">pitchfork@ederdrom.de</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">again<br>
<br>
check_http -H .... -u <a href="http://www.testsomething.com" target="_blank">http://www.testsomething.com</a><br>
<br>
is a proxy request. NOT an valid HTTP request<br>
<br>
Joerg<br>
<br>
Am 20.11.2012 um 08:35 schrieb Jaap van Arragon <<a href="mailto:j.vanarragon@lukkien.com">j.vanarragon@lukkien.com</a>>:<br>
<div class="HOEnZb"><div class="h5"><br>
> Herewith<br>
><br>
> define service{<br>
>        use                                     generic-service_24x7<br>
>        host_name                               www1<br>
>        service_description             check http <url><br>
>        check_command                   check_http! -u<br>
> <a href="http://www.testsomething.com" target="_blank">http://www.testsomething.com</a> -w 5 -c 8<br>
> }<br>
><br>
> This gives me a<br>
><br>
> HTTP OK: HTTP/1.1 200 OK - 414 bytes in 0.002 second response time<br>
><br>
> Back.<br>
><br>
><br>
> But in the browser the check gives me a<br>
><br>
> 503 statuscode back.<br>
><br>
> The Nagios check_http script isn't detecting this 503 error message.<br>
><br>
> Regards,<br>
><br>
> Jaap<br>
><br>
><br>
> On 11/20/12 8:20 AM, "Joerg Linge" <<a href="mailto:pitchfork@ederdrom.de">pitchfork@ederdrom.de</a>> wrote:<br>
><br>
>> Please provide a complete example!<br>
>> check_http works correct since years<br>
>><br>
>> Joerg<br>
>><br>
>> Am 19.11.2012 um 23:00 schrieb "Jaap van Arragon" <<a href="mailto:j.vanarragon@lukkien.com">j.vanarragon@lukkien.com</a>>:<br>
>><br>
>>> Hey Joerg,<br>
>>><br>
>>> The 4xx and 3xx error are handeld correctly but not the 5xx error ;-)<br>
>>><br>
>>> any ideas?<br>
>>><br>
>>> Regards,<br>
>>> Jaap<br>
>>> From: Joerg Linge [mailto:<a href="mailto:pitchfork@ederdrom.de">pitchfork@ederdrom.de</a>]<br>
>>> To: Nagios Users List [mailto:<a href="mailto:nagios-users@lists.sourceforge.net">nagios-users@lists.sourceforge.net</a>]<br>
>>> Sent: Mon, 19 Nov 2012 18:07:52 +0100<br>
>>> Subject: Re: [Nagios-users] Check_http status 503 gives 200 OK<br>
>>><br>
>>><br>
>>> Your example<br>
>>><br>
>>> /usr/local/nagios/libexec/check_http -I <ip address> -u http://<url> -w1 -c2<br>
>>><br>
>>> is a proxy request!<br>
>>><br>
>>> -I = ip address to connect to<br>
>>> -H = HTTP/1.1 Host Header<br>
>>> -u = relative url to fetch without protocol infos like http://<br>
>>><br>
>>> some examples<br>
>>><br>
>>> check <a href="http://nagios.org" target="_blank">nagios.org</a><br>
>>><br>
>>> OMD[gearman]:~/lib/nagios/plugins$ ./check_http -H <a href="http://nagios.org" target="_blank">nagios.org</a><br>
>>> HTTP OK: HTTP/1.1 200 OK - 54919 bytes in 1.703 second response time<br>
>>> |time=1.703114s;;;0.000000 size=54919B;;;0<br>
>>><br>
>>><br>
>>> OMD[gearman]:~/lib/nagios/plugins$ host <a href="http://nagios.org" target="_blank">nagios.org</a><br>
>>> <a href="http://nagios.org" target="_blank">nagios.org</a> has address 96.126.126.159<br>
>>><br>
>>> ok, nagios .org runns on 96.126.126.159<br>
>>> lets check a non existing page. we got 404!<br>
>>><br>
>>> OMD[gearman]:~/lib/nagios/plugins$ ./check_http -I 96.126.126.159 -H<br>
>>> <a href="http://nagios.org" target="_blank">nagios.org</a> -u /404<br>
>>> HTTP WARNING: HTTP/1.1 404 Not Found - 17141 bytes in 0.536 second response<br>
>>> time |time=0.536015s;;;0.000000 size=17141B;;;0<br>
>>><br>
>>> lets ask <a href="http://nagios.org" target="_blank">nagios.org</a> for <a href="http://icinga.org" target="_blank">icinga.org</a> ;) and we will get a 302<br>
>>><br>
>>> OMD[gearman]:~/lib/nagios/plugins$ ./check_http -I 96.126.126.159 -H<br>
>>> <a href="http://icinga.org" target="_blank">icinga.org</a> -u /<br>
>>> HTTP OK: HTTP/1.1 302 Found - 242 bytes in 1.837 second response time<br>
>>> |time=1.837209s;;;0.000000 size=242B;;;0<br>
>>><br>
>>> Joerg<br>
>>><br>
>>> Am 19.11.2012 um 17:14 schrieb Jaap van Arragon <<a href="mailto:j.vanarragon@lukkien.com">j.vanarragon@lukkien.com</a>>:<br>
>>><br>
>>>> Thank you for your reply.<br>
>>>><br>
>>>> Iıve tried the check without the ip adress option but it makes no<br>
>>>> difference.<br>
>>>><br>
>>>> Any other ideas?<br>
>>>><br>
>>>> Thanks.<br>
>>>><br>
>>>><br>
>>>> On 11/19/12 2:29 PM, "Ryan Edwards" <<a href="mailto:wyild1@gmail.com">wyild1@gmail.com</a>> wrote:<br>
>>>><br>
>>>>> You said u are using it like so:<br>
>>>>><br>
>>>>> Check:<br>
>>>>> /usr/local/nagios/libexec/check_http -I <ip address> -u http://<url> -w1<br>
>>>>> -c2<br>
>>>>><br>
>>>>> Maybe drop the IP address? I dunno, maybe cuz you have both IP and the url<br>
>>>>> its causing problems. Maybe its replying on the IP, but not on the URL your<br>
>>>>> providing. You prob only need one or the other if im not mistaken<br>
>>>>><br>
>>>>> Cheers!<br>
>>>>><br>
>>>>><br>
>>>>> On Mon, Nov 19, 2012 at 7:14 AM, Jaap van Arragon<br>
>>>>> <<a href="mailto:j.vanarragon@lukkien.com">j.vanarragon@lukkien.com</a>> wrote:<br>
>>>>>> Hello,<br>
>>>>>><br>
>>>>>> Does anyone know why it gives me a 200 back?<br>
>>>>>><br>
>>>>>> If you need more info, I will gladly provide it ;-)<br>
>>>>>><br>
>>>>>> Thank you.<br>
>>>>>><br>
>>>>>> Regards,<br>
>>>>>><br>
>>>>>> Jaap<br>
>>>>>><br>
>>>>>><br>
>>>>>> On 11/16/12 11:54 AM, "Jaap van Arragon" <<a href="mailto:j.vanarragon@lukkien.com">j.vanarragon@lukkien.com</a>> wrote:<br>
>>>>>><br>
>>>>>>> Hello,<br>
>>>>>>><br>
>>>>>>> Iım trying to use the check_http plugin to verify if one of our website<br>
>>>>>>> is<br>
>>>>>>> available.<br>
>>>>>>><br>
>>>>>>> When I check our website it gives me a 200 OK status code back even when<br>
>>>>>>> the<br>
>>>>>>> website isnıt available en the URL gives me a 503 status code through the<br>
>>>>>>> browser.<br>
>>>>>>><br>
>>>>>>> After some searching I came across the post below:<br>
>>>>>>><br>
>>>>>>> <a href="http://permalink.gmane.org/gmane.network.nagios.plugins.devel/485" target="_blank">http://permalink.gmane.org/gmane.network.nagios.plugins.devel/485</a><br>
>>>>>>><br>
>>>>>>> This states that there is a bug in check_http. The only thing is that the<br>
>>>>>>> post<br>
>>>>>>> is from 2003 so I expect that the necessary changes are already in the<br>
>>>>>>> new<br>
>>>>>>> release.<br>
>>>>>>><br>
>>>>>>> Things Iıve tried:<br>
>>>>>>><br>
>>>>>>> - recompiled the latest version of the check_http plugin but the<br>
>>>>>>> necessary<br>
>>>>>>> changes seems to be integrated there already.<br>
>>>>>>> - updated the plugins package to the latest version for our release<br>
>>>>>>><br>
>>>>>>> Check:<br>
>>>>>>> /usr/local/nagios/libexec/check_http -I <ip address> -u http://<url> -w1<br>
>>>>>>> -c2<br>
>>>>>>><br>
>>>>>>> Packages:<br>
>>>>>>><br>
>>>>>>> ii nagios-images 0.5<br>
>>>>>>> ii nagios-nrpe-plugin 2.12-4ubuntu1.10.04.1<br>
>>>>>>> ii nagios-nrpe-server 2.12-4ubuntu1.10.04.1<br>
>>>>>>> ii nagios-plugins 1.4.14-1ubuntu1<br>
>>>>>>> ii nagios-plugins-basic 1.4.14-1ubuntu1<br>
>>>>>>> ii nagios-plugins-standard 1.4.14-1ubuntu1<br>
>>>>>>> ii nagios3 3.2.0-4ubuntu2.2<br>
>>>>>>> ii nagios3-cgi 3.2.0-4ubuntu2.2<br>
>>>>>>> ii nagios3-common 3.2.0-4ubuntu2.2<br>
>>>>>>> ii nagios3-core 3.2.0-4ubuntu2.2<br>
>>>>>>> ii nagiosgrapher 1.7.1-1<br>
>>>>>>><br>
>>>>>>> Does anyone know why it gives me a status 200 OK back? At the moment I<br>
>>>>>>> can't<br>
>>>>>>> rely on my Nagios checks..<br>
>>>>>>><br>
>>>>>>> Thank you in advance<br>
>>>>>>><br>
>>>>>>> Regards<br>
>>>>>>> Jaap<br>
>>>>>><br>
>>>>>><br>
>>>>>><br>
>>>>>> --------------------------------------------------------------------------<br>
>>>>>> ----<br>
>>>>>> Monitor your physical, virtual and cloud infrastructure from a single<br>
>>>>>> web console. Get in-depth insight into apps, servers, databases, vmware,<br>
>>>>>> SAP, cloud infrastructure, etc. Download 30-day Free Trial.<br>
>>>>>> Pricing starts from $795 for 25 servers or applications!<br>
>>>>>> <a href="http://p.sf.net/sfu/zoho_dev2dev_nov" target="_blank">http://p.sf.net/sfu/zoho_dev2dev_nov</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" target="_blank">https://lists.sourceforge.net/lists/listinfo/nagios-users</a><br>
>>>>>> ::: Please include Nagios version, plugin version (-v) and OS when<br>
>>>>>> reporting any issue.<br>
>>>>>> ::: Messages without supporting info will risk being sent to /dev/null<br>
>>>>><br>
>>>>><br>
>>>> ----------------------------------------------------------------------------<br>
>>>> --<br>
>>>> Monitor your physical, virtual and cloud infrastructure from a single<br>
>>>> web console. Get in-depth insight into apps, servers, databases, vmware,<br>
>>>> SAP, cloud infrastructure, etc. Download 30-day Free Trial.<br>
>>>> Pricing starts from $795 for 25 servers or applications!<br>
>>>> <a href="http://p.sf.net/sfu/zoho_dev2dev_nov________________________________________" target="_blank">http://p.sf.net/sfu/zoho_dev2dev_nov________________________________________</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" target="_blank">https://lists.sourceforge.net/lists/listinfo/nagios-users</a><br>
>>>> ::: Please include Nagios version, plugin version (-v) and OS when reporting<br>
>>>> any issue.<br>
>>>> ::: Messages without supporting info will risk being sent to /dev/null<br>
>>><br>
>>><br>
>>><br>
> ----------------------------------------------------------------------------->><br>
> -<br>
>>> Monitor your physical, virtual and cloud infrastructure from a single<br>
>>> web console. Get in-depth insight into apps, servers, databases, vmware,<br>
>>> SAP, cloud infrastructure, etc. Download 30-day Free Trial.<br>
>>> Pricing starts from $795 for 25 servers or applications!<br>
>>> <a href="http://p.sf.net/sfu/zoho_dev2dev_nov" target="_blank">http://p.sf.net/sfu/zoho_dev2dev_nov</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" target="_blank">https://lists.sourceforge.net/lists/listinfo/nagios-users</a><br>
>>> ::: Please include Nagios version, plugin version (-v) and OS when reporting<br>
>>> any issue.<br>
>>> ::: Messages without supporting info will risk being sent to /dev/null<br>
>>><br>
> ----------------------------------------------------------------------------->><br>
> -<br>
>>> Monitor your physical, virtual and cloud infrastructure from a single<br>
>>> web console. Get in-depth insight into apps, servers, databases, vmware,<br>
>>> SAP, cloud infrastructure, etc. Download 30-day Free Trial.<br>
>>> Pricing starts from $795 for 25 servers or applications!<br>
>>> <a href="http://p.sf.net/sfu/zoho_dev2dev_nov_________________________________________" target="_blank">http://p.sf.net/sfu/zoho_dev2dev_nov_________________________________________</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" target="_blank">https://lists.sourceforge.net/lists/listinfo/nagios-users</a><br>
>>> ::: Please include Nagios version, plugin version (-v) and OS when reporting<br>
>>> any issue.<br>
>>> ::: Messages without supporting info will risk being sent to /dev/null<br>
>><br>
>><br>
>> ------------------------------------------------------------------------------<br>
>> Monitor your physical, virtual and cloud infrastructure from a single<br>
>> web console. Get in-depth insight into apps, servers, databases, vmware,<br>
>> SAP, cloud infrastructure, etc. Download 30-day Free Trial.<br>
>> Pricing starts from $795 for 25 servers or applications!<br>
>> <a href="http://p.sf.net/sfu/zoho_dev2dev_nov" target="_blank">http://p.sf.net/sfu/zoho_dev2dev_nov</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" target="_blank">https://lists.sourceforge.net/lists/listinfo/nagios-users</a><br>
>> ::: Please include Nagios version, plugin version (-v) and OS when reporting<br>
>> any issue.<br>
>> ::: Messages without supporting info will risk being sent to /dev/null<br>
><br>
><br>
><br>
> ------------------------------------------------------------------------------<br>
> Monitor your physical, virtual and cloud infrastructure from a single<br>
> web console. Get in-depth insight into apps, servers, databases, vmware,<br>
> SAP, cloud infrastructure, etc. Download 30-day Free Trial.<br>
> Pricing starts from $795 for 25 servers or applications!<br>
> <a href="http://p.sf.net/sfu/zoho_dev2dev_nov" target="_blank">http://p.sf.net/sfu/zoho_dev2dev_nov</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" target="_blank">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>
<br>
<br>
------------------------------------------------------------------------------<br>
Monitor your physical, virtual and cloud infrastructure from a single<br>
web console. Get in-depth insight into apps, servers, databases, vmware,<br>
SAP, cloud infrastructure, etc. Download 30-day Free Trial.<br>
Pricing starts from $795 for 25 servers or applications!<br>
<a href="http://p.sf.net/sfu/zoho_dev2dev_nov" target="_blank">http://p.sf.net/sfu/zoho_dev2dev_nov</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" target="_blank">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>
</div></div></blockquote></div><br></div>