[SOLVED] CHECK_NRPE: Error receiving data from daemon.
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
1) Make sure the /usr/local/nagios directory, sub-directories and files are owned by user "nagios".
2) Make sure you've configured xinetd to run the nrpe process as nagios user rather than root.
3) Make sure your nrpe.cfg has a line that is allowing the the Nagios server access e.g.:
Where x.x.x.x is the IP of the Nagios server.
Also check /var/log/messages to see if nrpe put anything there that might tell you what the problem is.
How did you configure the NRPE daemon? To listen to a specific IP (that of the Nagios server)? Did you run the test succesfully on the remote server as explained in the installation guide? Check logs for any indication (in Debian nrpe logs in /var/log/messages on receiving commands). I'm not at work right now and don't have access so cannot compare things. Post your NRPE config if you want me to have a look at it. I can compare to mine in the morning (that's in about 9.5 hours).
It looks to me that SELinux isn't the only problem you have. I'm not familiar with SELinux, so someone else will have to help out with that (or just disable it temporary to see if that helps). But as showing in the log you have some misconfiguration in your NRPE configuration file. Can you post the config file (masking private info where necessary of course).
PS: You can run the
run sealert -l 6c9b693f-15bd-4bdd-8197-f4bea61bfea3
command as stated in the log to find out more detailed information why SELinux is preventing stuff. Can you post that relevant output also?
The above I assume is what you're trying to execute. Delete those lines! Nagios and NRPE doesn't work that way.
When you 'tell' Nagios to run a command named 'check_users' agains a host connecting using the NRPE daemon, the first thing the daemon does, is see if that command exists in his config file (read at the bottom of your config file the examples)
Above is how NRPE 'looks' at command requests received from Nagios. Next NRPE runs the command after the '=' and the output gets reported back to Nagios. Following the command examples (comment them out by removing the # at the beginning of the line) you can format your commands. Of course the scripts you're calling will have to exist and have correct permissions set. But that's the next step
When you start to post a reply (not quick reply) there are icons across the top of the box that can be used to put tags around selected text. The one that looks like a little comic strip balloon with text is "quote" and the one next to it that looks like a pound/number sign is "code".
You highlight the text you want in a box then click the code button. It will prepend the highlighted text with "CODE" inside square brackets  and end it with "/CODE" inside square brackets. When you post it will show up as a code box. The quote button works the same way.
Of course you can always manually type the tags rather than clicking the buttons.
Last edited by MensaWater; 06-03-2010 at 09:48 AM.