Nagios remote nrpe check_disk returns permission denied
Posted: Fri Jun 16, 2017 6:10 am
Hi!
I have a problem with remote check_disk command using check_disk.
The remote server (RHEL 7.2) has nrpe installed and when I run check_disk locally, I get correct response:
/usr/lib64/nagios/plugins/check_disk -w 20% -c 10% -A -X configfs -X cgroup -X tmpfs -X selinuxfs -X sysfs -X proc -X mqueue -X binfmt_misc -X devtmpfs
DISK OK - free space: / 7231 MB (25% inode=92%); /boot 266 MB (62% inode=99%); /tmp 9387 MB (99% inode=99%); /var/log 95114 MB (99% inode=99%); /dataspace 87398 MB (22% inode=99%); /var/lib/docker/devicemapper 7231 MB (25% inode=92%);
But trying to run it from nagios server via nrpe returns:
/usr/lib64/nagios/plugins/check_nrpe -H server -c check_hda1
DISK CRITICAL - /var/lib/docker/devicemapper/mnt/39f72d56797955d3a4d9c21221b6da1ef3b98d0b165d89dd371cc70e80908009 is not accessible: Permission denied
Ive disabled SELinux on the remote server, Ive added permissions via sudo to allow nrpe and nagios user commands to run:
User_Alias NRPERS = nagios, nrpe
Cmnd_Alias NRPERSCOMMANDS = /usr/lib64/nagios/plugins/eventhandlers/fix_ipsec, /usr/bin/docker inspect *, /usr/lib64/nagios/plugins/check-docker-container.sh *
Defaults:NRPERS !requiretty
NRPERS ALL=(root) NOPASSWD: NRPERSCOMMANDS
Please what could be the problem?
I have a problem with remote check_disk command using check_disk.
The remote server (RHEL 7.2) has nrpe installed and when I run check_disk locally, I get correct response:
/usr/lib64/nagios/plugins/check_disk -w 20% -c 10% -A -X configfs -X cgroup -X tmpfs -X selinuxfs -X sysfs -X proc -X mqueue -X binfmt_misc -X devtmpfs
DISK OK - free space: / 7231 MB (25% inode=92%); /boot 266 MB (62% inode=99%); /tmp 9387 MB (99% inode=99%); /var/log 95114 MB (99% inode=99%); /dataspace 87398 MB (22% inode=99%); /var/lib/docker/devicemapper 7231 MB (25% inode=92%);
But trying to run it from nagios server via nrpe returns:
/usr/lib64/nagios/plugins/check_nrpe -H server -c check_hda1
DISK CRITICAL - /var/lib/docker/devicemapper/mnt/39f72d56797955d3a4d9c21221b6da1ef3b98d0b165d89dd371cc70e80908009 is not accessible: Permission denied
Ive disabled SELinux on the remote server, Ive added permissions via sudo to allow nrpe and nagios user commands to run:
User_Alias NRPERS = nagios, nrpe
Cmnd_Alias NRPERSCOMMANDS = /usr/lib64/nagios/plugins/eventhandlers/fix_ipsec, /usr/bin/docker inspect *, /usr/lib64/nagios/plugins/check-docker-container.sh *
Defaults:NRPERS !requiretty
NRPERS ALL=(root) NOPASSWD: NRPERSCOMMANDS
Please what could be the problem?