To install Nagios nrpe client and plugins in Ubuntu/Debian run following command:
$ apt-get install nagios-nrpe-server nagios-plugins
After installing client and plugins you need to change allowed_hosts configuration in nrpe.cfg file.
By default allowed_hosts value in nrpe.cfg is 127.0.0.1
You need to replace 127.0.0.1 with Nagios master IP address.
If your Nagios master IP address is 192.168.2.10, then allowed_hosts value looks like below:
After updating this value restart nagios-nrpe-server daemon with following command:
$ service nagios-nrpe-server restart
Now you need to check if slave is accessible from master or not with following command:
$ /usr/lib/nagios/plugins/check_nrpe -H 192.168.2.11
where 192.168.2.11 is slave IP address,
and NRPE v2.12 is NRPE plugin version in slave servers
If you wont get NRPE plugin version, mostly the problem is with nrpe.cfg file or your firewall in slave is not allowing to access.