我想定制Monit的警报消息,以便每当我收到警报时,该电子邮件还包括一个类似top的命令的输出,以便我已经知道可能导致问题的更多细节。
有没有办法做到这一点? 文档不包括任何相关的内容,search也没有帮助。
谢谢您的帮助!
那么从monit维基来看,这样的事情呢?
# 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 [email protected]'"
链接: http : //mmonit.com/wiki/Monit/ConfigurationExamples (滚动到非常底部)