Newbie help- check-ssl-certificate not evaluating $HOSTNAME$
Posted: Fri Nov 13, 2015 3:05 pm
server Nagios XI 2012R2.9
OS Centos 2.6.32-504.12.2.el6.centos.plus.i686
(not 100% sure how it was built, before my time)
Plugin https://exchange.nagios.org/directory/P ... te/details
The plugin works at the command line as user nagios and apache (substituting example.com for my hostname)
[root@nagioslvs libexec]# sudo -u apache /usr/local/nagios/libexec/check_ssl_certificate -H myhost.example.com
m=Mar, d=30, h=23, m=59, s=59, y=2016, z=GMT
[root@nagioslvs libexec]# sudo -u nagios /usr/local/nagios/libexec/check_ssl_certificate -H myhost.example.com
m=Mar, d=30, h=23, m=59, s=59, y=2016, z=GMT
I defined it as a command in core config mgr:
$USER1$/check_ssl_certificate -H $HOSTNAME$
type check command, active
However when I create a service and check the command, I do not get prompted for a hostname and I get no output
if I change the command definitionto -H $HOSTADDRESS$ I do get prompted for a hostname when I check the command, but still no output
Testing check from command line...
COMMAND: /usr/local/nagios/libexec/check_ssl_certificate -H myhost.example.com
OUTPUT:
The host is defined with the FQDN in hostname, description,and display name, and the IP in Address. And the test works against this host in the command line
I feel like I'm missing something basic here. I've gone into the core dir and looked at the host and service file and they don't seem any different from the others
thanks Betsy
OS Centos 2.6.32-504.12.2.el6.centos.plus.i686
(not 100% sure how it was built, before my time)
Plugin https://exchange.nagios.org/directory/P ... te/details
The plugin works at the command line as user nagios and apache (substituting example.com for my hostname)
[root@nagioslvs libexec]# sudo -u apache /usr/local/nagios/libexec/check_ssl_certificate -H myhost.example.com
m=Mar, d=30, h=23, m=59, s=59, y=2016, z=GMT
[root@nagioslvs libexec]# sudo -u nagios /usr/local/nagios/libexec/check_ssl_certificate -H myhost.example.com
m=Mar, d=30, h=23, m=59, s=59, y=2016, z=GMT
I defined it as a command in core config mgr:
$USER1$/check_ssl_certificate -H $HOSTNAME$
type check command, active
However when I create a service and check the command, I do not get prompted for a hostname and I get no output
if I change the command definitionto -H $HOSTADDRESS$ I do get prompted for a hostname when I check the command, but still no output
Testing check from command line...
COMMAND: /usr/local/nagios/libexec/check_ssl_certificate -H myhost.example.com
OUTPUT:
The host is defined with the FQDN in hostname, description,and display name, and the IP in Address. And the test works against this host in the command line
I feel like I'm missing something basic here. I've gone into the core dir and looked at the host and service file and they don't seem any different from the others
thanks Betsy