Page 1 of 1

How to set a criteria based on logentry count in logfileplug

Posted: Tue Apr 11, 2017 4:47 pm
by mdhinesh
Hi Friends,

I have a requirement in logfile monitor like, We need to trigger an alert if 10 same logentry appended in 15 minutes. Can you please help me how to do this in logfile monitor in Nagios Core.

Thanks,
Dhinesh.M

Re: How to set a criteria based on logentry count in logfile

Posted: Tue Apr 11, 2017 4:52 pm
by avandemore
This plugin may do what you wish:

https://exchange.nagios.org/directory/P ... es/details

Or our product Nagios Log Server can do it natively.

https://www.nagios.com/products/nagios-log-server/

Re: How to set a criteria based on logentry count in logfile

Posted: Wed Apr 12, 2017 2:41 pm
by mdhinesh
Hi,

Thanks for your response.

I am already using the same plugin. But requirement is, Client requires an alert if 50 matches found in 15 mins. i am using below command, It is triggering alert when 50 matches found. But it considering upcoming polling intervals as well. So if it found 30 matches in first polling interval, It won't stop there. It will take upcoming polling intervals match count into account and trigger an alert when it reaches 50.

command[check_logfilesnew]=/usr/local/nagios/libexec/check_logfiles -t 50 -logfile /tmp/test.log -tag test -criticalpattern "ERROR" -criticalthreshold 50

Is there any way to look for 50 matches in 15 mins in logfile monitor plugin?

Thanks,
Dhinesh

Re: How to set a criteria based on logentry count in logfile

Posted: Wed Apr 12, 2017 5:46 pm
by dwhitfield
We can certainly continue to help you here, but we did not write that plugin. You may want to contact gerhard.lausser@consol.de

Please let us know what you find out.