check_http - HTTP WARNING: HTTP/1.1 400 BAD REQUEST
-
sureshkraj2012
- Posts: 65
- Joined: Tue Aug 06, 2013 11:06 pm
check_http - HTTP WARNING: HTTP/1.1 400 BAD REQUEST
COMMAND: /usr/local/nagios/libexec/check_http -H 10.101.2.10 -p 7000 -v
OUTPUT: GET / HTTP/1.0
User-Agent: check_http/v2053 (nagios-plugins 1.4.13)
Connection: close
Host: 10.101.2.10:7000
http://10.101.2.10:7000/ is 214 characters
STATUS: HTTP/1.1 400 BAD REQUEST
**** HEADER ****
Date: Mon, 20 Jan 2014 02:26:37 GMT
Server: Apache/2.2.22 (Ubuntu)
Vary: Accept-Encoding
Content-Length: 15
Connection: close
Content-Type: text/html; charset=utf-8
**** CONTENT ****
Welcome to HomePage
HTTP WARNING: HTTP/1.1 400 BAD REQUEST
Any idea? How to fix this error?
OUTPUT: GET / HTTP/1.0
User-Agent: check_http/v2053 (nagios-plugins 1.4.13)
Connection: close
Host: 10.101.2.10:7000
http://10.101.2.10:7000/ is 214 characters
STATUS: HTTP/1.1 400 BAD REQUEST
**** HEADER ****
Date: Mon, 20 Jan 2014 02:26:37 GMT
Server: Apache/2.2.22 (Ubuntu)
Vary: Accept-Encoding
Content-Length: 15
Connection: close
Content-Type: text/html; charset=utf-8
**** CONTENT ****
Welcome to HomePage
HTTP WARNING: HTTP/1.1 400 BAD REQUEST
Any idea? How to fix this error?
-
sureshkraj2012
- Posts: 65
- Joined: Tue Aug 06, 2013 11:06 pm
Re: check_http - HTTP WARNING: HTTP/1.1 400 BAD REQUEST
Forgot to mention it, I even tried with -I option but no luck getting same output
COMMAND: /usr/local/nagios/libexec/check_http -I 10.101.2.10 -p 7000 -v
COMMAND: /usr/local/nagios/libexec/check_http -I 10.101.2.10 -p 7000 -v
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: check_http - HTTP WARNING: HTTP/1.1 400 BAD REQUEST
Can you show the output of the following:
Are you able to navigate to that address, with that port normally?
Code: Select all
nmap -p 7000 10.101.2.10-
sureshkraj2012
- Posts: 65
- Joined: Tue Aug 06, 2013 11:06 pm
Re: check_http - HTTP WARNING: HTTP/1.1 400 BAD REQUEST
Yeah. I can able to telnet to that port and navigate to the page without any issue
Re: check_http - HTTP WARNING: HTTP/1.1 400 BAD REQUEST
What happens when you add
to the check command? Did this solve the problem?
Code: Select all
-k "Accept: text/html"Be sure to check out our Knowledgebase for helpful articles and solutions!
-
sureshkraj2012
- Posts: 65
- Joined: Tue Aug 06, 2013 11:06 pm
Re: check_http - HTTP WARNING: HTTP/1.1 400 BAD REQUEST
No luck, still seeing same response
COMMAND: /usr/local/nagios/libexec/check_http -I 10.101.2.10 -p 7000 -k "Accept: text/html" -v
OUTPUT: GET / HTTP/1.0
User-Agent: check_http/v2053 (nagios-plugins 1.4.13)
Connection: close
Accept: text/html
http://10.101.2.10:7000/ is 214 characters
STATUS: HTTP/1.1 400 BAD REQUEST
**** HEADER ****
Date: Wed, 22 Jan 2014 03:58:56 GMT
Server: Apache/2.2.22 (Ubuntu)
Vary: Accept-Encoding
Content-Length: 15
Connection: close
Content-Type: text/html; charset=utf-8
**** CONTENT ****
NodeID required
HTTP WARNING: HTTP/1.1 400 BAD REQUEST
COMMAND: /usr/local/nagios/libexec/check_http -I 10.101.2.10 -p 7000 -k "Accept: text/html" -v
OUTPUT: GET / HTTP/1.0
User-Agent: check_http/v2053 (nagios-plugins 1.4.13)
Connection: close
Accept: text/html
http://10.101.2.10:7000/ is 214 characters
STATUS: HTTP/1.1 400 BAD REQUEST
**** HEADER ****
Date: Wed, 22 Jan 2014 03:58:56 GMT
Server: Apache/2.2.22 (Ubuntu)
Vary: Accept-Encoding
Content-Length: 15
Connection: close
Content-Type: text/html; charset=utf-8
**** CONTENT ****
NodeID required
HTTP WARNING: HTTP/1.1 400 BAD REQUEST
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: check_http - HTTP WARNING: HTTP/1.1 400 BAD REQUEST
how about running this from the CLI on the Nagios server
Code: Select all
curl -vvv http://10.101.2.10:7000/|head -50-
sureshkraj2012
- Posts: 65
- Joined: Tue Aug 06, 2013 11:06 pm
Re: check_http - HTTP WARNING: HTTP/1.1 400 BAD REQUEST
Thank you, Scott
Will get back to you the results
Will get back to you the results
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: check_http - HTTP WARNING: HTTP/1.1 400 BAD REQUEST
Please do, I would like to see what a standard curl response to this URL is...
thanks
thanks
-
sureshkraj2012
- Posts: 65
- Joined: Tue Aug 06, 2013 11:06 pm
Re: check_http - HTTP WARNING: HTTP/1.1 400 BAD REQUEST
Sorry for the delay
Here is the output
curl -vvv http://10.101.2.10:7000/|head -50
* About to connect() to 10.101.2.10 port 7000 (#0)
* Trying 10.101.2.10... connected
* Connected to 10.101.2.10 (10.101.2.10) port 7000 (#0)
> GET / HTTP/1.1
> User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.14.0.0 zlib/1.2.3 libidn/1.18 libssh2/1.4.2
> Host: 10.101.2.10:7000
> Accept: */*
>
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0< HTTP/1.1 400 BAD REQUEST
< Date: Wed, 26 Feb 2014 14:15:27 GMT
< Server: Apache/2.2.22 (Ubuntu)
< Vary: Accept-Encoding
< Content-Length: 15
< Connection: close
< Content-Type: text/html; charset=utf-8
<
{ [data not shown]
0 15 0 15 0 0 2591 0 --:--:-- --:--:-- --:--:-- 3750* Closing connection #0
Here is the output
curl -vvv http://10.101.2.10:7000/|head -50
* About to connect() to 10.101.2.10 port 7000 (#0)
* Trying 10.101.2.10... connected
* Connected to 10.101.2.10 (10.101.2.10) port 7000 (#0)
> GET / HTTP/1.1
> User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.14.0.0 zlib/1.2.3 libidn/1.18 libssh2/1.4.2
> Host: 10.101.2.10:7000
> Accept: */*
>
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0< HTTP/1.1 400 BAD REQUEST
< Date: Wed, 26 Feb 2014 14:15:27 GMT
< Server: Apache/2.2.22 (Ubuntu)
< Vary: Accept-Encoding
< Content-Length: 15
< Connection: close
< Content-Type: text/html; charset=utf-8
<
{ [data not shown]
0 15 0 15 0 0 2591 0 --:--:-- --:--:-- --:--:-- 3750* Closing connection #0