How to set a criteria based on logentry count in logfileplug

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
mdhinesh
Posts: 7
Joined: Wed Dec 21, 2016 12:15 pm

How to set a criteria based on logentry count in logfileplug

Post 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
avandemore
Posts: 1597
Joined: Tue Sep 27, 2016 4:57 pm

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

Post 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/
Previous Nagios employee
mdhinesh
Posts: 7
Joined: Wed Dec 21, 2016 12:15 pm

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

Post 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
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

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

Post 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.
Locked