check_log not outputting CRITICAL line content
Posted: Mon Aug 09, 2021 5:41 am
I'm trying to get the check_log plugin working on a simple application log file that checks for multiple errors in a single line but the Status Information field in the Nagios dashboard only outputs "(1)" and not the line that triggered the CRITICAL alert when it correctly detects one of the errors.
I have the following in the nrpe.cfg:
What needs to change to fix this? I've read about splitting the four strings into four separate checks but I'm looking to do over a dozen checks on the same server and would prefer to not have to if possible.
I have the following in the nrpe.cfg:
Code: Select all
command[check_blah_log_errors]=sudo /usr/lib64/nagios/plugins/check_log -F /foo/foot.log -O /foo/foo.log.old.nagios -q '.*`date +%Y-%m-%d`T.*error: error_string_1_here\|error_string_2_here\|error_string_3_here\|error_string_4_here'