NRPE: Unable to read output

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.
Locked
Eireocean
Posts: 22
Joined: Tue Oct 11, 2016 2:23 am

NRPE: Unable to read output

Post 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
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: NRPE: Unable to read output

Post 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
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Locked