0

Just installed Nagios on SERVER (10.20.8.106) and attached a CLIENT (10.20.10.11). So I defined my host and and a service for check_nrpe. It is working.

So I have check_nrpe plugin in the plugins(/usr/lib64/nagios/plugins/) directory of SERVER and CLIENT. I didn't know which check_nrpe was executed.

On the SERVER:

$/usr/lib64/nagios/plugins/check_nrpe -H 10.20.10.11
NRPE v2.15

On the CLIENT:

$usr/lib64/nagios/plugins/check_nrpe -H 10.20.8.106
connect to address 10.41.8.106 port 5666: No route to host
connect to host 10.41.8.106 port 5666: No route to host

The above confirmed to me that the check_nrpe plugin in SERVER's plugin directory was executed. So why do we have the plugins directory in the CLIENT? At first I thought, SERVER executes them from the plugin directory of CLIENT. And the plugins at SERVER side were used for doing checks on the same machine.I am confused at this moment.

Can anybody clarify.

2

We have the plugins directory in the monitored host (CLIENT), because you installed the nagios plugins. Nagios monitoring host executes the check_nrpe plugin specified for example as the following command:

$USER1$/check_nrpe -H $HOSTADDRESS$ -c check_disk

$HOSTADDRESS$ is the IP address of your CLIENT machine (monitored host).

On the monitored host the nrpe daemon runs on default port 5666 and when it receives the command from the Nagios server, it checks its config file for the corresponding command in /etc/nagios/nrpe.cfg:

command[check_disk]=/usr/lib64/nagios/plugins/check_disk -e -m -w 20% -c 10%

As you can see the /usr/lib64/nagios/plugins/check_disk is needed on the monitored host to check the available disk space. The Nagios server dosen't execute the check_disk plugin, instead it asks the monitored host to execute it and to reply with results.

Not the answer you're looking for? Browse other questions tagged or ask your own question.