lausser / check_logfiles

A plugin (monitoring-plugin, not nagios-plugin, see also http://is.gd/PP1330) which scans logfiles for patterns.
https://omd.consol.de/docs/plugins/check_logfiles/
GNU General Public License v2.0
46 stars 27 forks source link

Evaluate next line after match found #50

Open whatyoudoiswhatyouare opened 4 years ago

whatyoudoiswhatyouare commented 4 years ago

Hi,

I am using check_logfiles alot & am quite happy with it. What I could not resolve so far is this:

If a critical match is found in line n, I want to hold off ringing the alarm and evaluate the next line n+1 instead. If it matches pattern ABC, I want to ignore and ring the alarm if it does not.

So if my critical pattern was ERROR, I want that these 2 would be ignored:

ERROR global catastrophical error:
just a test though

But here, a critical error should be raised:

ERROR global catastrophical error:
somethin really bad happened that should be investigated

Any hint how this can be done with a supersmartscript?

Thanks!

whatyoudoiswhatyouare commented 4 years ago

Hi @lausser, any pointers on the above? Thanks!