Commandline Works / Nagios Alert Doesn't
Posted: Tue Jun 20, 2023 8:14 am
Hiya, I could use some help ...
When I issue this command from the commandline on the Nagios Core Server it works!
/usr/local/nagios/libexec/check_nrpe -H 10.0.0.50 -c check_proxy_memory -a 10.0.0.56
When Nagios Core Server calls this command it fails.
define command{
command_name check_proxy_memory
command_line /usr/local/nagios/libexec/check_nrpe -H 10.0.0.50 -c check_proxy_memory -a $HOSTADDRESS$
}
(It doesn't matter if I replace $HOSTADDRES$ with the IP either.)
With this nagios.log error:
SERVICE ALERT: gitlab;Proxy_Memory;CRITICAL;SOFT;1;CHECK_NRPE: Socket timeout after 10 seconds.
But the command completes in less than a second (& I've increased the timeout).
Note: Another similar command (check_proxy_ping) does work when called with "check_command" in hosts.cfg
Any ideas?
When I issue this command from the commandline on the Nagios Core Server it works!
/usr/local/nagios/libexec/check_nrpe -H 10.0.0.50 -c check_proxy_memory -a 10.0.0.56
When Nagios Core Server calls this command it fails.
define command{
command_name check_proxy_memory
command_line /usr/local/nagios/libexec/check_nrpe -H 10.0.0.50 -c check_proxy_memory -a $HOSTADDRESS$
}
(It doesn't matter if I replace $HOSTADDRES$ with the IP either.)
With this nagios.log error:
SERVICE ALERT: gitlab;Proxy_Memory;CRITICAL;SOFT;1;CHECK_NRPE: Socket timeout after 10 seconds.
But the command completes in less than a second (& I've increased the timeout).
Note: Another similar command (check_proxy_ping) does work when called with "check_command" in hosts.cfg
Any ideas?