Page 1 of 1

Commandline Works / Nagios Alert Doesn't

Posted: Tue Jun 20, 2023 8:14 am
by nateaard
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?

Re: Commandline Works / Nagios Alert Doesn't

Posted: Thu Jun 22, 2023 9:20 pm
by kg2857

Re: Commandline Works / Nagios Alert Doesn't

Posted: Fri Jun 23, 2023 9:22 am
by nateaard
Thanks for the suggestion. Oddly it wasn't a timeout, although the message would suggest that.

It was the way the command was being called, so that the right info wasn't being passed.

This has now been resolved.
kg2857 wrote: Thu Jun 22, 2023 9:20 pm Have you read this?
https://support.nagios.com/kb/article/n ... s-617.html