Page 1 of 1

Logfile Alert When String Unavailable

Posted: Wed May 11, 2016 8:45 am
by johnslippers
I am looking for a plugin I can use to monitor a custom logfile for a specific string. Sounds easy enough and I know there are a few well known plugins which can do this but the complicated part is that I need Nagios to alert me every time it does NOT find that specific string for a certain amount of minutes. Lets say if it can't find that string for 10 minutes, give a warning. If it can't find that string for 15 minutes, give a critical message.

I played around with the "check_last_logs.pl" and "check_timed_logs.pl" scripts but it gave me Piece.pm errors and am looking for something a little easier to configure.

Any help will be greatly appreciated.

Re: Logfile Alert When String Unavailable

Posted: Wed May 11, 2016 12:28 pm
by hsmith
Honestly, you should check out Nagios Log Server. It does exactly this. The free version can handle 500Mb / day of logs. Otherwise, I assume you're going to have to write your own plugin/wrapper script for XI.

Re: Logfile Alert When String Unavailable

Posted: Wed May 11, 2016 6:24 pm
by Box293
Nagios Log Server is the best option.

However if you can't use that, try:
https://labs.consol.de/nagios/check_logfiles/index.html