Problem
In the Nagios frontend the service checks reporting NRPE: Command '<COMMAND>' not defined
.
Reason
Most likely the file permissions are wrong as you can see as follows
root@ucs-backup:~# ls -la /etc/nagios/nrpe.univention.d/
insgesamt 80K
drw-r--r-- 2 root nogroup 4,0K Mär 20 17:37 .
drwxr-xr-x 9 root root 4,0K Apr 3 17:17 ..
-rw------ 1 root nogroup 391 Mär 7 2018 UNIVENTION_DISK_ROOT.cfg
-rw------- 1 root nogroup 380 Mär 7 2018 UNIVENTION_DNS.cfg
-rw------- 1 root nogroup 396 Mär 7 2018 UNIVENTION_JOINSTATUS.cfg
...
-rw------- 1 root nogroup 379 Okt 25 18:07 UNIVENTION_SWAP.cfg
-rw------- 1 root nogroup 390 Feb 16 2017 UNIVENTION_WINBIND.cfg
Solution
Correct the file permissions of the respective folder and the command config’s inside. The config files must be readable and the folder must also be executable, which means accessible.
root@ucs-backup:~# chmod +r -R /etc/nagios/nrpe.univention.d
root@ucs-backup:~# chmod +x /etc/nagios/nrpe.univention.d
They must look like
root@ucs-backup:~# ls -la /etc/nagios/nrpe.univention.d/
insgesamt 80K
drwxr-xr-x 2 root nogroup 4,0K Mär 20 17:37 .
drwxr-xr-x 9 root root 4,0K Apr 3 17:17 ..
-rw-r--r-- 1 root nogroup 391 Mär 7 2018 UNIVENTION_DISK_ROOT.cfg
-rw-r--r-- 1 root nogroup 380 Mär 7 2018 UNIVENTION_DNS.cfg
-rw-r--r-- 1 root nogroup 396 Mär 7 2018 UNIVENTION_JOINSTATUS.cfg
...
-rw-r--r-- 1 root nogroup 379 Okt 25 18:07 UNIVENTION_SWAP.cfg
-rw-r--r-- 1 root nogroup 390 Feb 16 2017 UNIVENTION_WINBIND.cfg