Page 1 of 2
Error while fetching http
Posted: Thu Feb 05, 2015 6:12 am
by rlinux57
Getting below error while fetching http service.
HTTP CRITICAL: HTTP/1.1 503 Service Unavailable - 1998 bytes in 0.258 second response time |time=0.257914s;;;0.000000 size=1998B;;;0
Even i have tried with both commands on nagios server and client end:
/usr/lib64/nagios/plugins/check_http -I IP ADDRESS
/usr/lib64/nagios/plugins/check_http -H HOSTNAME
Here's the command definition:
# 'check_http' command definition
define command{
command_name check_http
command_line $USER1$/check_http -H $HOSTADDRESS$ $ARG1$
}
Service definition:
define service{
use generic-service
host_name abc
service_description HTTP
check_command check_http
}
But when i run this command on client end with parameter of localhost then it's running fine:
/usr/local/nagios/libexec/check_http -H localhost -w 2 -c 3
HTTP OK: HTTP/1.1 200 OK - 316 bytes in 0.001 second response time |time=0.000788s;2.000000;3.000000;0.000000 size=316B;;;0
Re: Error while fetching http
Posted: Thu Feb 05, 2015 10:36 am
by abrist
Can you check the access logs (and maybe the error logs as well) on the remote web server?
Run the check from the nagios server, and then run the following on the remote web server:
Code: Select all
tail -50 /var/log/httpd/access_log > /tmp/httpd.log
tail -50 /var/log/httpd/error_log >> /tmp/httpd.log
Attach the file /tmp/httpd.txt to your next post.
Re: Error while fetching http
Posted: Thu Feb 05, 2015 12:16 pm
by rlinux57
I have attached log file of client end alongside this post.
Re: Error while fetching http
Posted: Thu Feb 05, 2015 10:26 pm
by rlinux57
Would you please update, i have attached httpdlogs in previous post.
Re: Error while fetching http
Posted: Thu Feb 05, 2015 10:40 pm
by Box293
We'll need to wait for Andy to reply back tomorrow sorry.
What is usual is this in your original post:
rlinux57 wrote:Getting below error while fetching http service.
HTTP CRITICAL: HTTP/1.1 503 Service Unavailable - 1998 bytes in 0.258 second response time |time=0.257914s;;;0.000000 size=1998B;;;0
rlinux57 wrote:But when i run this command on client end with parameter of localhost then it's running fine:
/usr/local/nagios/libexec/check_http -H localhost -w 2 -c 3
HTTP OK: HTTP/1.1 200 OK - 316 bytes in 0.001 second response time |time=0.000788s;2.000000;3.000000;0.000000 size=316B;;;0
I can see a lot more bytes from the Nagios server compared to when it is run on the localhost. Does your Nagios server go through a proxy to get to the destination server?
Re: Error while fetching http
Posted: Thu Feb 05, 2015 10:59 pm
by rlinux57
It's okay, i'll be waiting.
No, i do not use any proxy to reached its destination.
Re: Error while fetching http
Posted: Fri Feb 06, 2015 11:17 am
by abrist
Run nmap from the nagios server against the remote server and post the output:
Re: Error while fetching http
Posted: Sat Feb 07, 2015 12:13 am
by rlinux57
the output of nmap command:
Starting Nmap 5.51 (
http://nmap.org ) at 2015-02-07 00:18 EST
Note: Host seems down. If it is really up, but blocking our ping probes, try -Pn
Nmap done: 1 IP address (0 hosts up) scanned in 0.46 seconds
but the ports 80,443 are open in /etc/services and also pingable.
Re: Error while fetching http
Posted: Sun Feb 08, 2015 5:41 am
by rlinux57
Any update ???
Re: Error while fetching http
Posted: Sun Feb 08, 2015 6:28 pm
by Box293
rlinux57 wrote:Even i have tried with both commands on nagios server and client end:
/usr/lib64/nagios/plugins/check_http -I IP ADDRESS
/usr/lib64/nagios/plugins/check_http -H HOSTNAME
Can you please try these commands using the verbose argument and post the full output. For example:
Code: Select all
./check_http -H www.google.com -v
GET / HTTP/1.1
User-Agent: check_http/v2.0.3.121.g8077 (nagios-plugins 2.0.3)
Connection: close
Host: www.google.com
Accept: */*
http://www.google.com:80/ is 551 characters
STATUS: HTTP/1.1 302 Found
**** HEADER ****
Cache-Control: private
Content-Type: text/html; charset=UTF-8
Location: http://www.google.com.au/?gfe_rd=cr&ei=9PDXVNrmAqXu8wfHkYCwDQ
Content-Length: 262
Date: Sun, 08 Feb 2015 23:27:48 GMT
Server: GFE/2.0
Alternate-Protocol: 80:quic,p=0.02
Connection: close
**** CONTENT ****
<HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">
<TITLE>302 Moved</TITLE></HEAD><BODY>
<H1>302 Moved</H1>
The document has moved
<A HREF="http://www.google.com.au/?gfe_rd=cr&ei=9PDXVNrmAqXu8wfHkYCwDQ">here</A>.
</BODY></HTML>
HTTP OK: HTTP/1.1 302 Found - 551 bytes in 0.133 second response time |time=0.132621s;;;0.000000 size=551B;;;0