CHECK_NRPE: Error receiving data from daemon

Hi friends,

I got error CHECK_NRPE: Error receiving data from daemon when I am executing customised plugin.
#./check_nrpe -H 192.168.10.20 -c check_mem

But when I executing same plugin from the shell prompt it is working fine.
#./check_mem_git --mem 15 10

In my nrpe.cfg file configuration is
command[check_mem]=/usr/local/nrpe-2.0/check_mem_git --mem 15 10

I am also surpricing that another default plugins are running fine.

Thanks in advance for your valuable guidenace. :o

Running the check locally is not nearly the same as having nrpe client make a connection to a remote host, and have that remote host perform the check.

You need to make sure that you are able to make the connection. There are many many topics in this forum that all have had the same trouble. Check the nrpe docs and make sure you have done all that is required to make the connection.

But all others default plugins are working ok.
This new plugin is not working and giving me error.Same this plugin is working on diffenernt machine is working ok.
I am so much confused due to this…

You say it runs by hand on the broken machine? But if you try and make nrpe run it, it won’t?

Post the output of the error please.

default plugins means check_memory,check_load,check_users,check_procs are running ok.But I create one plugin with name check_mem is not working.It is shell script

#./check_nrpe -H 192.168.10.20 -c check_mem
CHECK_NRPE: Error receiving data from daemon.

./check_nrpe -H 192.168.10.20 -c check_memory

Status: OK - 82% memory free.

./check_nrpe -H 192.168.10.20 -c check_procs

PROCS OK: 94 processes

./check_nrpe -H 192.168.10.20 -c check_users

USERS OK - 3 users currently logged in |users=3;5;10;0
#./check_nrpe -H 192.168.10.20 -c check_mem
CHECK_NRPE: Error receiving data from daemon.

if I execute the same shell script from shell is working very well…like this…
#./check_mem --mem 15 10
MEMORY:15 CRITICAL - System has free memory::2 %(14 mb) from total 475 mb memory

Edited Mon Jun 06 2005, 10:32PM ]

Did you run that from the local or remote. Try it on both, paste the output.
It sounds like the command is not defined. Perhaps restarting the daemon on the remote host would force it to reread the configs.

make sure you ahve the ip configured in the nrpe.cfg of the hsot you are monitoring from.

If that is what is wrong, then the install instructions have not been followed to the letter. Seeing so many problems with nrpe posted here, leeds me to believe, that the install instruction file is name “please_ignore_this_install_instructions.txt_file”. I’ve read through it, and it seems to be very clear, so I really don’t see why all these problems come up.

This seems to be the stock answer to this question, and also the incorrect one.
His other nrpe plugins are working fine, so that cannot be the issue

Also, it says in nrpe.cfg
[blockquote]#NOTE: This option is ignored if NRPE is running under either inetd or xinetd
allowed_hosts=127.0.0.1
[/blockquote]

I am having the same problem with check_dhcp. My other nrpe checks on the same host are working fine. I was wondering if this wasa ever resolved?
If so, I would love to hear the solution. If not, I will post back if I find a solution

My problem was solved, and it was a permissions issue on the check_dhcp plugin
I matched the owner and permissions to the other plugins, and it worked.
Dumb oversight on my part…

Correct, but it the README says:
If your system uses xinetd…
only_from = …
}
So, one way or another, it’s not entirely wrong to make sure that the remote IP is allowed to connect. I’d have to say most of my replies are stock answers too, since most every question can be resolved by reading the docs over again. There are execptions, but in general, yea, my replies are “stock”.

BTW, good fix on that DHCP check. STicky bit to the rescue.