Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
epixelitsupport
Posts: 85 Joined: Fri Nov 08, 2019 2:40 am
Post
by epixelitsupport » Thu Apr 16, 2020 4:41 pm
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
cdienger
Support Tech
Posts: 5045 Joined: Tue Feb 07, 2017 11:26 am
Post
by cdienger » Thu Apr 16, 2020 4:46 pm
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:
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new
Privacy Policy .
epixelitsupport
Posts: 85 Joined: Fri Nov 08, 2019 2:40 am
Post
by epixelitsupport » Fri Apr 17, 2020 4:25 am
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
cdienger
Support Tech
Posts: 5045 Joined: Tue Feb 07, 2017 11:26 am
Post
by cdienger » Fri Apr 17, 2020 11:24 am
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
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new
Privacy Policy .
epixelitsupport
Posts: 85 Joined: Fri Nov 08, 2019 2:40 am
Post
by epixelitsupport » Fri Apr 17, 2020 11:37 am
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
cdienger
Support Tech
Posts: 5045 Joined: Tue Feb 07, 2017 11:26 am
Post
by cdienger » Fri Apr 17, 2020 3:01 pm
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
}
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new
Privacy Policy .