check_log3 inconsistant results & permission denied
Posted: Thu Jan 22, 2015 4:21 pm
Simple Diagram of Network without backbone structure.
Nagios XI -> cloud/internet -> Remote Linux Server with NRPE configured
We are using this via a NRPE check through a Remote Linux Sever to check its own log files.
On this Remote Linux Server I have placed check_log3.pl file in /usr/local/nagios/libexec
Issue 1:
As root user, I get inconsistent results.
./check_log3 -l /var/log/messages -p 'START'
I get lots back which is expected.
./check_log3 -l /var/log/messages -p 'SELinux'
I get a 0 count. which is not expected as this word is in this log file.
Why doesn't it find the words I am searching for?
Issue 2
I have set this up in Nagios XI, as a NRPE check , I get permission denied on /var/log/messages.
I understand Linux permissions.
I am just wondering what is the recommend to set the permission for the log file reading?
I am guessing you want nagios to be in the group permission on this Remote Server.
I wish to keep my Linux server as secure as possible.
Nagios XI -> cloud/internet -> Remote Linux Server with NRPE configured
We are using this via a NRPE check through a Remote Linux Sever to check its own log files.
On this Remote Linux Server I have placed check_log3.pl file in /usr/local/nagios/libexec
Issue 1:
As root user, I get inconsistent results.
./check_log3 -l /var/log/messages -p 'START'
I get lots back which is expected.
./check_log3 -l /var/log/messages -p 'SELinux'
I get a 0 count. which is not expected as this word is in this log file.
Why doesn't it find the words I am searching for?
Issue 2
I have set this up in Nagios XI, as a NRPE check , I get permission denied on /var/log/messages.
I understand Linux permissions.
I am just wondering what is the recommend to set the permission for the log file reading?
I am guessing you want nagios to be in the group permission on this Remote Server.
I wish to keep my Linux server as secure as possible.