Page 2 of 2
Re: HTTP WARNING: HTTP/1.1 400 Bad Request
Posted: Thu Apr 16, 2020 4:41 pm
by epixelitsupport
cdienger wrote:Yes, and you should also have one for the host that looks like:
Code: Select all
define host {
host_name ...
address ...
...
}
The likely problem is that using "-I" causes the check to use the IP address which may not work if the IP hosts multiple websites. Change the command to use -H instead:
Code: Select all
define command{
command_name check_http
command_line $USER1$/check_http -I $HOSTADDRESS$ $ARG1$
}
Here its is
https://prnt.sc/s0t615
and I have already changed to H from I
Re: HTTP WARNING: HTTP/1.1 400 Bad Request
Posted: Thu Apr 16, 2020 4:46 pm
by cdienger
The value for host_name appears to have a space "... Server". This needs to be a valid hostname that can resolve to an IP.
You can test the command directly with:
Re: HTTP WARNING: HTTP/1.1 400 Bad Request
Posted: Fri Apr 17, 2020 4:25 am
by epixelitsupport
cdienger wrote:The value for host_name appears to have a space "... Server". This needs to be a valid hostname that can resolve to an IP.
You can test the command directly with:
I will share you my conf file as PM Please check,
Only this project is not working this for me
Re: HTTP WARNING: HTTP/1.1 400 Bad Request
Posted: Fri Apr 17, 2020 11:24 am
by cdienger
I did not receive a PM. Please try sending again. I would also appreciate the output seen when running the command like so:
Code: Select all
/usr/local/nagios/libexec/check_http -I nginx_hostname -v
Re: HTTP WARNING: HTTP/1.1 400 Bad Request
Posted: Fri Apr 17, 2020 11:37 am
by epixelitsupport
cdienger wrote:I did not receive a PM. Please try sending again. I would also appreciate the output seen when running the command like so:
Code: Select all
/usr/local/nagios/libexec/check_http -I nginx_hostname -v
here it is
https://prnt.sc/s1blxv
and I have resent the conf file
Re: HTTP WARNING: HTTP/1.1 400 Bad Request
Posted: Fri Apr 17, 2020 3:01 pm
by cdienger
Modify the host definition so that the address line uses the fqdn instead:
Code: Select all
define host{
use linux-box
host_name ... Server
alias ... Server
address ....com
}
Re: HTTP WARNING: HTTP/1.1 400 Bad Request
Posted: Fri Apr 17, 2020 3:35 pm
by epixelitsupport
Thats not helping ,
All the services getting down when I changed to it
https://prnt.sc/s1fzjw I have only problem with the Nginx port checking all the services are running good