Commandline Works / Nagios Alert Doesn't

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.
Post Reply
nateaard
Posts: 3
Joined: Tue Jun 20, 2023 8:01 am

Commandline Works / Nagios Alert Doesn't

Post 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?
kg2857
Posts: 237
Joined: Wed Apr 12, 2023 5:48 pm

Re: Commandline Works / Nagios Alert Doesn't

Post by kg2857 »

nateaard
Posts: 3
Joined: Tue Jun 20, 2023 8:01 am

Re: Commandline Works / Nagios Alert Doesn't

Post 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
Post Reply