Make monit mail-format send top as well

五迷三道 提交于 2019-12-08 08:41:11

问题


I'm using monit to monitor some services. However, I want to get an email which includes the output from top when this happens. Is there some way to get this information?


回答1:


Don't know if you can get it from the mail-format (which would be pretty nice) but they have the following example in the 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'"


来源:https://stackoverflow.com/questions/31513996/make-monit-mail-format-send-top-as-well

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!