NRPE: Unable to read output check_load

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.
pianunix
Posts: 51
Joined: Tue Jul 22, 2014 3:08 am

NRPE: Unable to read output check_load

Post by pianunix »

Hi,

Today i had the same problem when trying to check_load using this command :

/usr/lib/nagios/plugins/check_nrpe -H server43012x -c check_load
NRPE: Unable to read output

After reproduce in every post that i;m search still can't solve this. Does anyone know how to fix this ?

Thanks.

Mod Edit: Also mentioned here - http://support.nagios.com/forum/viewtop ... 05#p106405
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: NRPE: Unable to read output check_load

Post by slansing »

Can you attach your nrpe.cfg from that remote host here so we can see your command definition? Thanks!
pianunix
Posts: 51
Joined: Tue Jul 22, 2014 3:08 am

Re: NRPE: Unable to read output check_load

Post by pianunix »

Hi,

The command from the remote host looks good

# /usr/lib/nagios/plugins/check_load -w 15,10,5 -c 30,25,20
CRITICAL - load average: 23.66, 23.07, 22.93|load1=23.660;15.000;30.000;0; load5=23.070;10.000;25.000;0; load15=22.930;5.000;20.000;0;

Thx.
Attachments
nrpe.txt
nrpe configuration
(7.86 KiB) Downloaded 576 times
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: NRPE: Unable to read output check_load

Post by Box293 »

What happens when you test if NRPE is listening?

Code: Select all

/usr/lib/nagios/plugins/check_nrpe -H server43012x
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
pianunix
Posts: 51
Joined: Tue Jul 22, 2014 3:08 am

Re: NRPE: Unable to read output check_load

Post by pianunix »

^ Ithinkg looks good

~# /usr/lib/nagios/plugins/check_nrpe -H server43012x
NRPE v2.15

Any solution ?

Thanks.
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: NRPE: Unable to read output check_load

Post by Box293 »

We know that NRPE is listening so thats good.

I noticed in your nrpe.cfg file that the nrpe_user is defined as "nrpe".
pianunix wrote:The command from the remote host looks good

# /usr/lib/nagios/plugins/check_load -w 15,10,5 -c 30,25,20
CRITICAL - load average: 23.66, 23.07, 22.93|load1=23.660;15.000;30.000;0; load5=23.070;10.000;25.000;0; load15=22.930;5.000;20.000;0;
When executing this command on the remote host, are you doing it as the nrpe user?

Code: Select all

su nrpe
/usr/lib/nagios/plugins/check_load -w 15,10,5 -c 30,25,20
Also, lets check some file permissions:

Code: Select all

ls -al /usr/lib/nagios/plugins/
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
pianunix
Posts: 51
Joined: Tue Jul 22, 2014 3:08 am

Re: NRPE: Unable to read output check_load

Post by pianunix »

Hi,

No i didn't.

Code: Select all

# su nrpe
This account is currently not available.

Code: Select all

# id nagios
uid=496(nagios) gid=497(nagios) groups=497(nagios)
Should i use nrpe user for this ?

Fyi: on the debian machine i was sucessfull doing this, by adding this line into /etc/sudoers on the remote host.

Code: Select all

nagios ALL=(ALL) NOPASSWD:/usr/lib/nagios/plugins/check_load
But when i trying on centos machine this trick didn't work at all.

Thanks.
User avatar
lmiltchev
Former Nagios Staff
Posts: 13587
Joined: Mon May 23, 2011 12:15 pm

Re: NRPE: Unable to read output check_load

Post by lmiltchev »

Is there any reason why you changed the defalt nrpe user/group from nagios to nrpe?

Have you tried changing the following two lines from this:

Code: Select all

nrpe_user=nrpe
nrpe_group=nrpe
to this:

Code: Select all

nrpe_user=nagios
nrpe_group=nagios
and restarting the daemon?
Be sure to check out our Knowledgebase for helpful articles and solutions!
pianunix
Posts: 51
Joined: Tue Jul 22, 2014 3:08 am

Re: NRPE: Unable to read output check_load

Post by pianunix »

Hi,

Still wont work at all.

Code: Select all

/usr/lib/nagios/plugins/check_nrpe -H server43012x -c check_load
NRPE: Unable to read output
turboscrew
Posts: 23
Joined: Wed Jul 30, 2014 6:15 am

Re: NRPE: Unable to read output check_load

Post by turboscrew »

One way to check further is to set "debug=1" in your nrpe.cfg.
Then you can check the last lines of "journalctl --system" (works like 'less')
It should output something like:

Code: Select all

Jul 25 23:07:29 nrpecomputer nrpe[9645]: Connection from 127.0.0.1 port 44715
Jul 25 23:07:29 nrpecomputer nrpe[9645]: Host address is in allowed_hosts
Jul 25 23:07:29 nrpecomputer nrpe[9645]: Handling the connection...
Jul 25 23:07:29 nrpecomputer nrpe[9645]: Host is asking for command 'check_all_disks' to be run...
Jul 25 23:07:29 nrpecomputer nrpe[9645]: Running command: /usr/lib64/nagios/plugins/check_disk -w 20% -c 10% -p /dev/vda
Jul 25 23:07:29 nrpecomputer nrpe[9645]: Command completed with return code 0 and output: DISK OK - free space: / 8139 MB (85% inode=92%);| /=1373MB;7960;8955;0;9951
Jul 25 23:07:29 nrpecomputer nrpe[9645]: Return Code: 0, Output: DISK OK - free space: / 8139 MB (85% inode=92%);| /=1373MB;7960;8955;0;9951
Jul 25 23:07:29 nrpecomputer nrpe[9645]: [30B blob data]
Locked