Cha*_*des 2 linux monitoring monit
我想自定义 Monit 的警报消息,以便每当我收到警报时,电子邮件还包含类似 的命令的输出top
,以便我已经知道可能导致问题的原因的更多详细信息。
有没有办法做到这一点?该文档不包含任何相关内容,搜索也无济于事。
谢谢您的帮助!
小智 5
来自monit wiki的这样的东西怎么样?
# Getting top otput by mail on event
check file myfile with path /tmp/fo.bar
if changed timestamp then exec "/bin/bash -c 'top -bn1 | mail -s top admin@foo.bar'"
Run Code Online (Sandbox Code Playgroud)
链接:http : //mmonit.com/wiki/Monit/ConfigurationExamples (滚动到最底部)
归档时间: |
|
查看次数: |
3358 次 |
最近记录: |