???
Basically you first have to install the NRPE Server to get the checks running.
Change the allowed_hosts
Variable to localhost and the IP-Address of your Icinga2 Server.
apt install -y nagios-nrpe-server
nano /etc/nagios/nrpe.cfg
allowed_hosts=127.0.0.1,123.123.123.123
service nagios-nrpe-server reload
These are some examples you can realise using NRPE and the basic NRPE Checks.
Please place your local checks in /etc/nagios/nrpe_local.cfg
so they are not overwritten in an update.
command[check_users]=/usr/lib/nagios/plugins/check_users -w 2 -c 3
command[check_disk]=/usr/lib/nagios/plugins/check_disk -l -w 20% -c 10% -p / -p /boot -p /home -p /usr -p /var -p /tmp
command[check_swap]=/usr/lib/nagios/plugins/check_swap -w 50% -c 25%
command[check_load]=/usr/lib/nagios/plugins/check_load -r -w 20 -c 50
command[check_procs_zombies]=/usr/lib/nagios/plugins/check_procs -s Z -c :5 -w :2
command[check_ntpmon]=/usr/lib/nagios/plugins/check_ntp_time -H 1.de.pool.ntp.org -w 0.5 -c 1