<!DOCTYPE html PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN'>
<html><head><meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<style>BODY{font:10pt Tahoma,Verdana,sans-serif} .MsoNormal{line-height:120%;margin:0}</style></head><body>
Hey Joerg,<div><br></div><div>The 4xx and 3xx error are handeld correctly but not the 5xx error ;-)</div><div><br></div><div>any ideas?</div><div><br></div><div>Regards,</div><div>Jaap </div><div><blockquote style="padding-left: 5px; margin-left: 5px; border-left: #0000ff 2px solid; margin-right: 0px"><hr><b>From:</b> Joerg Linge [mailto:pitchfork@ederdrom.de]<br><b>To:</b> Nagios Users List [mailto:nagios-users@lists.sourceforge.net]<br><b>Sent:</b> Mon, 19 Nov 2012 18:07:52 +0100<br><b>Subject:</b> 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 <a href="http://" target="_blank">http://</a><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 nagios.org<br>
<br>
OMD[gearman]:~/lib/nagios/plugins$ ./check_http -H nagios.org<br>
HTTP OK: HTTP/1.1 200 OK - 54919 bytes in 1.703 second response time |time=1.703114s;;;0.000000 size=54919B;;;0<br>
<br>
<br>
OMD[gearman]:~/lib/nagios/plugins$ host nagios.org<br>
nagios.org 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 nagios.org -u /404<br>
HTTP WARNING: HTTP/1.1 404 Not Found - 17141 bytes in 0.536 second response time |time=0.536015s;;;0.000000 size=17141B;;;0<br>
<br>
lets ask nagios.org for icinga.org ;) and we will get a 302<br>
<br>
OMD[gearman]:~/lib/nagios/plugins$ ./check_http -I 96.126.126.159 -H icinga.org -u /<br>
HTTP OK: HTTP/1.1 302 Found - 242 bytes in 1.837 second response time |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 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 <a href="http://" target="_blank">http://</a><url> -w1 -c2<br>
>> <br>
>> Maybe drop the IP address?  I dunno, maybe cuz you have both IP and the url its causing problems. Maybe its replying on the IP, but not on the URL your 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 <<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 is<br>
>>> > available.<br>
>>> ><br>
>>> > When I check our website it gives me a 200 OK status code back even when 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 post<br>
>>> > is from 2003 so I expect that the necessary changes are already in the new<br>
>>> > release.<br>
>>> ><br>
>>> > Things I’ve tried:<br>
>>> ><br>
>>> > - recompiled the latest version of the check_http plugin but the 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 <a href="http://" target="_blank">http://</a><url> -w1 -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 can't<br>
>>> > rely on my Nagios checks..<br>
>>> ><br>
>>> > Thank you in advance<br>
>>> ><br>
>>> > Regards<br>
>>> > Jaap<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>
> 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>
</blockquote><style>
</style>
</div></body></html>