monitoring - 如何在monit中限制日志警报

标签 monitoring monit

嘿,
我们在monit中进行了设置,从而可以监视大量日志文件中的字符串“Exception”。当monit看到此字符串时,我们将收到一封电子邮件警报。

有时候,当我们的应用程序多次遇到相同的异常时,我们就会非常垃圾邮件。

一种解决方案是在记录异常的方式上变得更聪明,但有时这种类型的“经常重复”异常可能发生的地方并不总是很明显,直到为时已晚并且被垃圾邮件泛滥为止。

想知道是否有人知道任何一种限制监视警报的方法。例如,当同一异常发生5次以上时,在给定时间段内停止警报。

任何想法,将不胜感激。

最佳答案

这在Monit 5.4中已修复:

Monit 5.4 or newer sends only one alert in the given cycle, changelog excerpt:

--8<-- * The content match test now sends one event per cycle and pattern. Even if there are multiple lines matching the same pattern, only one event will be generated. Also the event rate is fixed now, so it is possible to require match for X cycles before generating the event. --8<--



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

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

关于monitoring - 如何在monit中限制日志警报,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4251678/

相关文章:

mysql - sensu 服务器、客户端和 api 无法启动

用于监控网站正常运行时间(包括资源)的 Python 实用程序

ubuntu - Nagios Core - 如何使用 pnp4nagios 显示图形图标?

linux - 使用 Monit 监控远程文件系统

java - J2SE 中的手机监控器

hadoop - 如何获取原始Hadoop指标

web-services - 任何监控 IIS 和应用程序性能的工具

server - 运行 'monit restart all' 给出无效操作

为自定义脚本运行 "check program"时出现监控错误