Error while fetching http
Error while fetching http
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
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
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:
Attach the file /tmp/httpd.txt to your next post.
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
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Re: Error while fetching http
I have attached log file of client end alongside this post.
- Attachments
-
- httpdlogs.txt
- (6.17 KiB) Downloaded 321 times
Re: Error while fetching http
Would you please update, i have attached httpdlogs in previous post.
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: Error while fetching http
We'll need to wait for Andy to reply back tomorrow sorry.
What is usual is this in your original post:
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
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?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
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: Error while fetching http
It's okay, i'll be waiting.
No, i do not use any proxy to reached its destination.
No, i do not use any proxy to reached its destination.
Re: Error while fetching http
Run nmap from the nagios server against the remote server and post the output:
Code: Select all
nmap -p 80 <ip of remote server>
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Re: Error while fetching http
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.
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
Any update ???
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: Error while fetching http
Can you please try these commands using the verbose argument and post the full output. For example: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
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
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.