Problem: recieving "Log check error: Log file /var/log/secure is not readable!" over nrpe when executing check_log binary (named diff_log in nrpe.cfg on remote host for the command and pointing to /usr/lib64/nagios/plugins/check_log)
Code: Select all
[root@nagiosserver nrpe-3.0.1]# /usr/lib64/nagios/plugins/check_nrpe -H <ip> -c diff_log -a /var/log/secure /home/nagios/authFailures authentication failures
Log check error: Log file /var/log/secure is not readable!
however, this is not the case when the plugin is executed locally:
Code: Select all
[nagios@remotehost~]$ /usr/lib64/nagios/plugins/check_log -F /var/log/secure -O /home/nagios/authFailures -q "authentication failure"
Log check ok - 0 pattern matches found
permissions on check_log:
Code: Select all
ls -l /usr/lib64/nagios/plugin/check_log
-rwxr-xr-x. 1 nagios nagios 5989 Sep 11 2015 check_log
Code: Select all
log_facility=daemon
pid_file=/var/run/nrpe/nrpe.pid
server_port=5666
nrpe_user=nagios
nrpe_group=nagios
...
Code: Select all
# file: var/log/secure
# owner: root
# group: root
user::rw-
user:nagios:r--
group::---
group:monitoring:r--
group:nagios:r--
mask::r--
other::---
I have also restarted nrpe service a couple times, just for good measure. OS is RHEL 7.2