Menu

check_log3.pl update 3.5

The check_log3.pl plugin now supports a new --context (-C) option to return lines of "context" before and/or after a match, à la "grep -C".

Note: if you use -e and modify $parse_out, no context will be returned, only $parse_out. If you want to change the output when using -C, modify @line_buffer instead, this list contains the lines of data up to and including the matched line. You cannot change read-ahead lines in this manner.

Other new options:
--stop-first-match (-1), to output the first match found rather than the last one, i.e. with this option every single match will be reported
--ok, to always return OK status to Nagios, meant for use with -e when you just want to do graphing of numbers found in log files

Posted by Peter Mc Aulay 2013-04-08

Log in to post a comment.