Having trouble getting this NRPE plugin to remotely execute. The documentation provided is somewhat confusing to me. Here are the configs I’ve got running…

On the Nagios server…

#In services.cfg, I have:


define service{
use generic-service
name check_nrpe
host_name mail-01
check_command check_nrpe!check_disk!20%!10%!/
service_description Check mail server disk space
register 1
notification_interval 10
max_check_attempts 5

#In misccommands.cfg, I have:


define command{
command_name check_nrpe
command_line /usr/local/nagios/libexec/check_nrpe -H $HOSTADDRESS$ -c $ARG1$

On the remote host:

allowed_hosts=<ip of the nagios server>
command[check_disk]=/usr/local/nagios/libexec/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$

I’ve started the nrpe manually in daemon mode (not using inetd or xinetd), and restarting Nagios returns this error when it tries to run the check_nrpe command (I get the same error trying to run it from command line):

Connection refused or timed out

I’m not sure what’s wrong here. I’ve read and reread the README supplied but it’s not getting me anywhere. I’ve already checked ownership and permissions on the plugin and those specs are the same as all the other plugins in my libexec/ directory. Please help!

Did you compile with --enable-command-args? If not, then you can’t use dont_blame_nrpe=1 in nrpe.cfg
Other than that, you might want to try setting it up using INETD or XINETD, or perhaps, disable your firewalls for this testing.