您好,登录后才能下订单哦!
安装:sudo apt-get install monit
收集人
#email address which will receive monit alerts
set alert sim@abc.com
如果不需要monit每次reload都给自己发邮件
set alert sim@abc.com not {instance}
邮件格式
set mail-format {
from: sim@abc.com
subject: XXX alert -- $EVENT $SERVICE
message: $EVENT Service $SERVICE
Date: $DATE
Action: $ACTION
Host: XXX Server
Description: $DESCRIPTION
Monitor System
}
启用http
Enable httpd: set httpd port 2812
#Then: sudo monit reload
#Then: localhost:2812
这份配置文件已经包含很多监控选项,可以根据需求设定
启动monit:sudo monit
Check log:
sudo tail -f /var/log/monit.log
grep sshd /var/log/monit.log
Check syntax:
sudo monit -t
check filesystem Media with path /dev/sdb1df
if space usage > 90% then alert
-监控网络连接
check host WWW with address 192.20.1.40
if failed ping then alert
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。