Page 1 of 1

NRPE: Unable to read output

Posted: Wed Feb 12, 2020 6:00 am
by Eireocean
Good Day,

As per subject, I am getting the following error :

NRPE: Unable to read output

commands.cfg - Nagios Server

Code: Select all

define command {
    command_name    check_mounts
    command_line    $USER1$/check_nrpe -H $HOSTADDRESS$ -c check_mounts
}
services.cfg - Nagios Server

Code: Select all

define service{
   use                          generic-service,srv-pnp
   host_name                    CLIENT
   service_description          Check For CIFS Mount - SERVER: /data1/work/documentstore
   check_command                check_nrpe!check_mounts
   contact_groups               Anon,AnonSms
   }
nrpe.cfg - Nagios Client

Code: Select all

# Check Mounts
command[check_mounts]=sudo /usr/lib64/nagios/plugins/check_mount.sh /data1/work/documentstore cifs
Plugin

https://exchange.nagios.org/directory/P ... is/details

Output when run on client :

Code: Select all

[nagios@SERVER ~]$ sudo /usr/lib64/nagios/plugins/check_mount.sh /data1/work/documentstore cifs
OK - /data1/work/documentstore mounted under cifs.
check_mount.sh v1.02
Not sure what I am missing ?

Regards

Re: NRPE: Unable to read output

Posted: Wed Feb 12, 2020 10:38 am
by scottwilkerson
Can you show the output here from the remote machine

Code: Select all

grep nagios /etc/sudoers
It's possible you need to add a line

Code: Select all

Defaults:nagios !requiretty