使monit邮件格式也发送到顶部

时间:2015-07-20 10:19:36

标签: monit

我使用monit来监控某些服务。但是,我希望在发生这种情况时收到包含top输出的电子邮件。有没有办法获得这些信息?

1 个答案:

答案 0 :(得分:0)

不知道你是否可以从邮件格式中获取它(这将是相当不错的),但他们在monit wiki中有以下示例:

check file myfile with path /tmp/foo.bar if changed timestamp then
   exec "/bin/bash -c 'top -bn1 | mail -s top admin@foo.bar'"
相关问题