How to set a criteria based on logentry count in logfileplug

This forum is intended for the discussion of Nagios plugin development. Feature requests, patches, bug fixes, and all types of development-related discussions are welcome!

NOTE: The SourceForge.net nagiosplug-devel mailing list has been deprecated in favor of this forum in order to expedite support and provide additional features not available on the old mailing list.

How to set a criteria based on logentry count in logfileplug

Postby mdhinesh » Tue Apr 11, 2017 4:47 pm

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

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

Postby avandemore » Tue Apr 11, 2017 4:52 pm

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/
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
avandemore
Support Tech
 
Posts: 1397
Joined: Tue Sep 27, 2016 4:57 pm
Location: Nagios Enterprises

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

Postby mdhinesh » Wed Apr 12, 2017 2:41 pm

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

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

Postby dwhitfield » Wed Apr 12, 2017 5:46 pm

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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
dwhitfield
The Doctor
 
Posts: 2819
Joined: Wed Sep 21, 2016 10:29 am
Location: Nagios Enterprises, LLC


Return to Nagios Plugin Development

Who is online

Users browsing this forum: celticpiping and 2 guests