[NAGIOS] error 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
seddikalaouiismaili
Posts: 3
Joined: Wed Jul 11, 2018 3:33 am

[NAGIOS] error NRPE: Unable to read output

Post by seddikalaouiismaili »

Hi team

I have nagios server installed on linux server (centos 6) , and all communications with nrpe clients are done .
To monitor free memory usage of (RAM),I created script perl to do this .
You can see below the result of script's execution

Code: Select all

bash-4.1# ./check_mem -f -w 20 -c 10
CRITICAL - 9.7% (183684 kB) free!|TOTAL=1902800KB;;;; USED=1719116KB;1522240;1712520;; FREE=183684KB;;;; CACHES=458376KB;;;;
Note that the configuration on server and client is :

==> Nagios_server
on commands.cfg

define command{
command_name check_nrpe
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -u -c $ARG1$
}

on service.cfg

define service{
use generic-service
host_name XXXXXXX
service_description Free Memory
check_command check_nrpe!check_mem
}

==> Nrpe client

command[check_mem]=/usr/lib64/nagios/plugins/check_mem -f -w 20 -c 10


Problem : when it's ececuted remotly i got this error (its tha same on web interface and CLI ):

Code: Select all

NRPE: Unable to read output
Normally the nagios server know how to execute the check remotly and configuration semms correct .

Thank you in advance

Best Regards

Seddik Alaoui
bolson

Re: [NAGIOS] error NRPE: Unable to read output

Post by bolson »

Hello,

If you run:

Code: Select all

/usr/local/nagios/libexec/check_nrpe -H <host_ip>
By itself and it returns the version of NRPE, but the command returns "Unable to read output", the issue is likely in the script itself. Not knowing the contents of the script, it's difficult to diagnose your issue. If you run one of the standard built in plugins via check_nrpe, do you get data back?
Locked