如何在 monit 中限制日志警报
嘿, 我们在 monit 中有一个设置,可以用来监视大量日志文件中的字符串“Exception”。当 monit 看到此字符串时,我们会收到一封电子邮件警报。
有时,当我们的应用程序多次遇到相同的异常时,我们会收到大量垃圾邮件。
一种解决方案是更智能地记录异常,但有时并不总是很明显可能发生这种类型的“经常重复”异常,直到为时已晚并且我们已收到垃圾邮件。
想知道是否有人知道任何限制监视警报的方法。例如,当相同异常发生超过 5 次时,在给定时间内停止警报。
任何想法将不胜感激。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这在 Monit 5.4 中已修复:
具有较旧软件包的系统可能会在第三方存储库中找到更新版本。例如:
http ://apt.sw.be/redhat/el5/en/i386/dag/RPMS/monit-5.5-1.el5.rf.i386.rpm
This was fixed in Monit 5.4:
Systems with older packages might find an updated version in a third-party repo. e.g.:
http://apt.sw.be/redhat/el5/en/i386/dag/RPMS/monit-5.5-1.el5.rf.i386.rpm