Hello,
I use the check_xi_host_http to check HTTP Side. The associated command is $USER1$/check_http -H $HOSTADDRESS$ $ARG1$
The configures host have:
Hostname = www.example.com
address = 23.12.12.11
With this command, the http check uses the IP adresse instead of the hostname. the problem is that the Web server only access request qith the correct hostname.
I change the command to $USER1$/check_http -H $HOSTNAME$ $ARG1$.
But for any reason it does not work. In the services you can run the check command, but you get.:
[[email protected] ~]$ /usr/local/nagios/libexec/check_http -H $HOSTNAME$ -S check_http: Invalid hostname/address - nagios.asecus.ch$
It looks like that the Nagios is not able to get the correct value for $HOSTNAME$$.
Is someone aware about this issue?
I found a workaround, but i am not satisfied.
REgards
pascal
check_xi_host_http
-
npolovenko
- Support Tech
- Posts: 3457
- Joined: Mon May 15, 2017 5:00 pm
Re: check_xi_host_http
Hello, @praemy. If you don't want this service check to use the IP address and only check the host with the domain name/URL, then you can change the address field to:
Also, from the Nagios server's console please run the following command and show me the output:address = http://www.example.com
Where www.example.com is the domain name.nslookup www.example.com
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: check_xi_host_http
Hello,
Thanks for the answer. That's what i did, but for me it is a workaround.
The question is: why the check does not work if i change the variable to $HOSTNAME$.
The Hostname contain www.example.com and the address the IP.
For me, i thing that we have here a Bug.
Thanks for the answer. That's what i did, but for me it is a workaround.
The question is: why the check does not work if i change the variable to $HOSTNAME$.
The Hostname contain www.example.com and the address the IP.
For me, i thing that we have here a Bug.
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: check_xi_host_http
It should work with that, but not when testing from the command line
You cannot run
You would have to run
You cannot run
Code: Select all
/usr/local/nagios/libexec/check_http -H $HOSTNAME$ -SCode: Select all
/usr/local/nagios/libexec/check_http -H www.example.com -S