check_logfiles icon indicating copy to clipboard operation
check_logfiles copied to clipboard

Check Alerts problems

Open LeGoulu opened this issue 8 years ago • 2 comments

Hello and thanks for this awesome work !

Maybe im a ***ing noob and this is just because i don't know how it works but i have a problem with nagios alerts.

The first launch, all is ok : I have my logs errors and im happy ! The second check : It say, no errors .. like a reset (rotation, seekfile ?) but my log file is always full of errors !?

LeGoulu avatar May 20 '16 09:05 LeGoulu

Hi,

someone blogged about check_logfiles in France? Ten minutes after your mail i got the same question from another french guy  When you run check_logfiles, it looks where it sopped last time (end-of-file last time) and then reads from this position tot he new end-of-file. Then it saves the end-of-file position again in a so-called seek-file (in /var/tmp/check_logfiles or $OMD_ROOT/var/tmp/check_logfiles if you use OMD). This way, check_logfiles scans only the lines which were appended tot he logfile since the last run. You cannot repeat this by subsequently calling check_logfiles. In the service-definition you write:

max_check_attempts 1 is_volatile 1 check_period 5

Now you get an alert whenever in the last 5 minutes there was an error message.

Gerhard

lausser avatar May 20 '16 09:05 lausser

Also note that you can use options => 'sticky=3600' to keep the alert for 1 hour.

NicolaiSoeborg avatar Feb 23 '17 16:02 NicolaiSoeborg