标签:stat local pass alert timeout monit 命令 password led
安装: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
标签:stat local pass alert timeout monit 命令 password led
原文地址:https://blog.51cto.com/helpdesk/2467293