Add the following entry for the NRPE daemon to the /etc/services file.

# echo "nrpe 5666/tcp #NRPE" >> /etc/services

Restart the NRPE service

# /etc/init.d/xinetd restart

Test if NRPE is listening:

# netstat -l | grep nrpe

The output out this command should show something like this:

tcp 0 0 *:nrpe *:* LISTEN

Next, check to make sure the NRPE daemon is functioning properly. To do this, run the check_nrpe plugin that was installed for testing purposes.

# /usr/local/nagios/libexec/check_nrpe -H localhost

If everything is fine you will see this output:

NRPE v2.12

9. Test the NRPE from the Nagios-Server
Now we want to test if we can query some information from the Debian-Host via NRPE from the Nagios-Server.
So switch into /usr/local/nagios/libexec on your Nagios Server and check if you have the check_nrpe plugin.

# ls - l check_ nrpe

In case you dont have the check_nrpe plugin you need to download and compile NRPE. (See Step 8)
run the next command:

# ./check_nrpe -H HostIPAddress -c check_users

You should get something like this back:

USERS OK - 1 users currently logged in |users=1;5;10;0

Great! Your Nagios server is able to communicate with the Debian-Host.