There may be a number of potential problems while configuring Nagios. If you see an error like this,
1)Connection refused by host:
You get the above error, If you don't put the correct IP address in the nrpe.cfg file on the client, or if you do it correctly but forgot to restart NRPE on the client.
2) NRPE: Command 'check_users' not defined
Indicates that you didn't define the commands you wanted, again on the client, or you didn't restart NRPE on the client after you defined them.
3)NRPE: Unable to read output
Usually means that the path to the plugin to run is incorrect on the client. If you change it, remember to restart NRPE again.
4)The check_nrpe plugin returns "CHECK_NRPE: Socket timeout after 10 seconds" or"Connection refused or timed out"
This error can indicate several things:
The command that the NRPE daemon was asked to run took longer than 10 seconds to execute. This is the most likely cause if the error message was "CHECK_NRPE: Socket timeout after 10 seconds". Use the -t command line option to specify a longer timeout for the check_nrpe plugin. The following example will increase the timeout to 30 seconds:
/usr/local/nagios/check_nrpe -H localhost -c somecommand -t 30
The NRPE daemon is not installed or running on the remote host. Verify that the NRPE daemon is running as standalone daemon or under inetd/xinetd with one of the following commands:
ps axuw | grep nrpe
netstat -at | grep nrpe
There is a firewall that is blocking the communication between the monitoring host (which runs the check_nrpe plugin) and the remote host (which runs the NRPE daemon). Verify that the firewall rules (e.g. iptables) that are running on the remote host allow for communication and make sure there isn't a physical firewall that is located between the monitoring host and the remote host.
5)The check_nrpe plugin returns "CHECK_NRPE: Received 0 bytes from daemon. Check the remote server logs for an error message."
First thing you should do is check the remote server logs for an error message. Seriously. :-) This error could be due to the following problem:
The check_nrpe plugin was unable to complete an SSL handshake with the NRPE daemon. An error message in the logs should indicate whether or not this was the case. Check the versions of OpenSSL that are installed on the monitoring host and remote host. If you're running a commercial version of SSL on the remote host, there might be some compatibility problems.
6)The check_nrpe plugin returns "NRPE: Command 'x' not defined"
This error means that you didn't define command x in the NRPE configuration fileon the remote host. On the remote host, add the command definition for x. See the existing command definitions in the NRPE configuration file for more information on doing this. If you're running the NRPE daemon as a standalone daemon (and not under inetd or xinetd), you'll need to restart it in order for the new command to be recognized.
7)The check_nrpe plugin returns "NRPE: Command timed out after x seconds"
This error indicates that the command that was run by the NRPE daemon did not finish executing within the specified time. You can increase the timeout for commands by editing the NRPE configuration file and changing the value of the command_timeout variable. If you're running the NRPE daemon as a standalone daemon (and not under inetd or xinetd), you'll need to restart it in order for the new timeout to be recognized.
Sunday, April 26, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment