Check for a pattern is NOT found issue alarm

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
apollopt
Posts: 1
Joined: Tue Mar 18, 2014 4:24 am

Check for a pattern is NOT found issue alarm

Post 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.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Check for a pattern is NOT found issue alarm

Post 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
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Locked