apt install nagios-nrpe-server
Configuration changes:
nano /etc/nagios/nrpe.cfg
command[check_disk]=/usr/lib/nagios/plugins/check_disk -w 60 -c 50 -u GB -p /
allowed_hosts=127.0.0.1,$nagios_server_ip
Restart service:
/etc/init.d/xinetd restart
/etc/init.d/nagios-nrpe-server restart
Nagios server configurations:
nano /nagios/server/directory/server.cfg
define host{
use linux-server
host_name hostname
alias hostname
address IP
max_check_attempts 2
check_period 24x7
notification_interval 30
notification_period 24x7
}
define service{
use generic-service
host_name hostname
service_description Disk Usage
check_command check_nrpe!check_disk!-a '-w 60 -c 50 -u GB -p /'
}