Install NRPE on Linux (Ubuntu) remote host
- sudo apt-get install nagios-nrpe-server
- Now on remote-host edit /etc/nagios/nrpe.cfg changing: allowed_hosts= nagios server ip
- Add below in the command definition area command[check_users]=/usr/lib/nagios/plugins/check_users -w 5 -c 10 command[check_load]=/usr/lib/nagios/plugins/check_load -w 15,10,5 -c 30,25,20 command[check_all_disks]=/usr/lib/nagios/plugins/check_disk -w 20 -c 10 command[check_total_procs]=/usr/lib/nagios/plugins/check_procs -w 150 -c 200 command[check_swap]=/usr/lib/nagios/plugins/check_swap -w 20 -c 10 Finally, restart nagios-nrpe-server:
- sudo /etc/init.d/nagios-nrpe-server restart or sudo service nagios-nrpe-server restart
- Download check_nrpe on nagios server.
- Install it on /usr/local/nagios/libexec
- nrpe command definition at /usr/local/nagios/etc/objects/commands.cfg
- Now test the connection to the remote server we set up just now. The test should be performed from nagios server. /usr/local/nagios/libexec/check_nrpe -H REMOTE.SERVER.IP NRPE v2.12 [out put should be like this]