HTTP WARNING: HTTP/1.1 400 Bad Request
HTTP WARNING: HTTP/1.1 400 Bad Request
Hi ! Have strange request from check_http after configure
/usr/local/nagios/libexec/check_http portal.work.com
HTTP WARNING: HTTP/1.1 400 Bad Request - 391 bytes in 0.745 second response time |time=0.744530s;;;0.000000 size=391B;;;0
I know theare load balancer, how can i configure correcct command ?
/usr/local/nagios/libexec/check_http portal.work.com
HTTP WARNING: HTTP/1.1 400 Bad Request - 391 bytes in 0.745 second response time |time=0.744530s;;;0.000000 size=391B;;;0
I know theare load balancer, how can i configure correcct command ?
Re: HTTP WARNING: HTTP/1.1 400 Bad Request
Can you run check_http with verbose output (-v) enabled and share the (sanitized) output? It may offer some clues:
Does this portal have a specific port that needs to be used other than 80/443?
Code: Select all
/usr/local/nagios/libexec/check_http portal.work.com -v
Former Nagios employee
https://www.mcapra.com/
https://www.mcapra.com/
Re: HTTP WARNING: HTTP/1.1 400 Bad Request
mcapra wrote:Can you run check_http with verbose output (-v) enabled and share the (sanitized) output? It may offer some clues:
Does this portal have a specific port that needs to be used other than 80/443?Code: Select all
/usr/local/nagios/libexec/check_http portal.work.com -v
Code: Select all
root@web01:~# /usr/local/nagios/libexec/check_http portal.work.com -v
GET / HTTP/1.0
User-Agent: check_http/v2.1.4 (nagios-plugins 2.1.4)
Connection: close
Accept: */*
http://portal.work.com:80/ is 391 characters
STATUS: HTTP/1.1 400 Bad Request
**** HEADER ****
Server: nginx
Date: Fri, 14 Apr 2017 03:25:29 GMT
Content-Type: text/html; charset=iso-8859-1
Content-Length: 226
Connection: close
**** CONTENT ****
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>400 Bad Request</title>
</head><body>
<h1>Bad Request</h1>
<p>Your browser sent a request that this server could not understand.<br />
</p>
</body></html>
HTTP WARNING: HTTP/1.1 400 Bad Request - 391 bytes in 0.503 second response time |time=0.503225s;;;0.000000 size=391B;;;0
-
- Former Nagios Staff
- Posts: 4583
- Joined: Wed Sep 21, 2016 10:29 am
- Location: NoLo, Minneapolis, MN
- Contact:
Re: HTTP WARNING: HTTP/1.1 400 Bad Request
Is this a public website? Can you pm the URL so that we can test? If you pm make sure you update this thread so it comes back up on our portal.
UPDATE: addresses shared with techs
UPDATE: addresses shared with techs
Last edited by dwhitfield on Wed Apr 19, 2017 8:55 am, edited 1 time in total.
Reason: pm received
Reason: pm received
Re: HTTP WARNING: HTTP/1.1 400 Bad Request
Send you pm, please check.dwhitfield wrote:Is this a public website? Can you pm the URL so that we can test? If you pm make sure you update this thread so it comes back up on our portal.
-
- Former Nagios Staff
- Posts: 4583
- Joined: Wed Sep 21, 2016 10:29 am
- Location: NoLo, Minneapolis, MN
- Contact:
Re: HTTP WARNING: HTTP/1.1 400 Bad Request
You need a -H before the host. Note also the difference if you use -S versus not using it.
Code: Select all
[root@centos7x64 scripts]# /usr/local/nagios/libexec/check_http -H portal.com -S
HTTP OK: HTTP/1.1 200 OK - 10029 bytes in 1.521 second response time |time=1.520601s;;;0.000000 size=10029B;;;0
[root@centos7x64 scripts]# /usr/local/nagios/libexec/check_http -H portal.com
HTTP OK: HTTP/1.1 301 Moved Permanently - 368 bytes in 1.545 second response time |time=1.544647s;;;0.000000 size=368B;;;0
Re: HTTP WARNING: HTTP/1.1 400 Bad Request
I reconfigure my .cfg file, changedwhitfield wrote:You need a -H before the host. Note also the difference if you use -S versus not using it.
Code: Select all
[root@centos7x64 scripts]# /usr/local/nagios/libexec/check_http -H portal.com -S HTTP OK: HTTP/1.1 200 OK - 10029 bytes in 1.521 second response time |time=1.520601s;;;0.000000 size=10029B;;;0 [root@centos7x64 scripts]# /usr/local/nagios/libexec/check_http -H portal.com HTTP OK: HTTP/1.1 301 Moved Permanently - 368 bytes in 1.545 second response time |time=1.544647s;;;0.000000 size=368B;;;0
Code: Select all
check_command
Code: Select all
check_http
Code: Select all
check_http!-HS
Code: Select all
HTTP OK: HTTP/1.1 301 Moved Permanently
Re: HTTP WARNING: HTTP/1.1 400 Bad Request
Try using the -f follow option:
Code: Select all
/usr/local/nagios/libexec/check_http -H portal.work.com -f follow
Re: HTTP WARNING: HTTP/1.1 400 Bad Request
change tossax wrote:Try using the -f follow option:
Code: Select all
/usr/local/nagios/libexec/check_http -H portal.work.com -f follow
Code: Select all
check_http!-H!-f follow
Re: HTTP WARNING: HTTP/1.1 400 Bad Request
The command should look like this:
define command{
command_name check_http
command_line $USER1$/check_http -H $HOSTADDRESS$ $ARG1$
}
and then the check command:
check_command check_http!-f follow
define command{
command_name check_http
command_line $USER1$/check_http -H $HOSTADDRESS$ $ARG1$
}
and then the check command:
check_command check_http!-f follow
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.