Check file age
Posted: Tue Nov 03, 2015 8:27 am
I am running Nagios Xi 2014R2.7 and NRPE v2.15 on a SUSE Linux server 11sp4. I am attempting to monitor a few websites access_log files under the Apache directory. I can login to the webserver that I want to do the check with and su to the nagios user and run the check and it works.
If I login to the Nagios server and then su to the nagios user to run the command remotely I get this.
I have this entry in the nrpe.cfg file locally on the client server as well.
Not sure what else I need to change or do to get this check working.
Code: Select all
/usr/local/nagios/libexec/check_file_age -f /var/log/apache2/apache-access_log -w 240 -c 300
FILE_AGE OK: /var/log/apache2/apache-access_log is 1 seconds old and 5105057 bytes
Code: Select all
./check_nrpe -H <webserver> -c check_apache_access_log
FILE_AGE CRITICAL: File not found - /var/log/apache2/apache-access_log
Code: Select all
command[check_apache_access_log]=/usr/local/nagios/libexec/check_file_age -f /var/log/apache2/apache-access_log -w 240 -c 300