Page 1 of 1

Check for a pattern is NOT found issue alarm

Posted: Tue Mar 18, 2014 4:32 am
by apollopt
Hello All,


I have tried to Google for some hours now but without luck...

I'm trying to find a NAGIOS check that do more or less the opposite then the check_logs check.

I want a check that checks a log file and if he don't find a predefined pattern he issues an alarm...

For example i would like to to check on a file for the patter "[SOME-END], [SOME-BEGIN]" and if this pattern is not find a alarm is issue...


Thanks in advance.

Re: Check for a pattern is NOT found issue alarm

Posted: Tue Mar 18, 2014 3:52 pm
by abrist
Have you considered using the negate plugin? You can use the negate plugin to change one type of state to another, i.e. Critical to Ok and Ok to Critical.
http://assets.nagios.com/downloads/nagi ... Plugin.pdf