也使 monit mail-format 发送到顶部

Make monit mail-format send top as well

我正在使用 monit 来监控一些服务。但是,当发生这种情况时,我想收到一封包含 top 输出的电子邮件。有什么方法可以获取这些信息吗?

不知道您是否可以从邮件格式中获取它(这会非常好)但是他们在 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'"