6

Hey there, We have a setup in monit whereby we monitor a whole lot of log files for the string "Exception". When monit sees this string, we get an email alert.

There are times when we get spammed very heavily when our application hits the same exception many times.

One solution would be to be smarter around the way we log exceptions, but sometimes it's not always obvious where this type of "often-repeating" exception may occur, until it's too late and we've been spammed.

Was wondering if anyone knew of any method of throttling monit alerts. For example when the same exception occurs more than 5 times, stop alerting for a give period.

Any ideas would be appreciated.

4

1 回答 1

0

这已在 Monit 5.4 中修复:

Monit 5.4 或更新版本在给定周期内仅发送一个警报,更改日志摘录:

--8<-- * 内容匹配测试现在每个周期和模式发送一个事件。即使有多行匹配相同的模式,也只会生成一个事件。此外,事件发生率现在是固定的,因此在生成事件之前可能需要匹配 X 个周期。--8<--

具有较旧软件包的系统可能会在第三方存储库中找到更新版本。例如:

http://apt.sw.be/redhat/el5/en/i386/dag/RPMS/monit-5.5-1.el5.rf.i386.rpm

于 2014-12-16T19:32:04.550 回答