用 monit 实现崩溃自动发送邮件提醒
- 教程
- 2017-07-18
- 6热度
- 2评论
前言
安装 monit 教程请看 —— 在 Ubuntu 上安装 Monit 并更新至最新版,安装好 monit 后,我们就可以监控服务器和环境的状况的,这里我们将实现自动发送安全提醒电子邮件和服务器高负载提醒。
配置
修改 /etc/monit/monitrc 文件,在 第11行 将
#Mail settings
修改为:
#Mail settings
set mail-format {
from: noreply@mail.mf8.biz
subject: monit alert -- $EVENT
message: $EVENT Service $SERVICE
Date: $DATE
Action: $ACTION
Host: $HOST
Description: $DESCRIPTION
Your faithful employee,
Monit }
set mailserver smtpdm.aliyun.com port 465 username noreply@mail.mf8.biz password "your-smtp-password"
using SSLV3 with timeout 60 seconds
set alert webmaster@wp-bullet.com ```
注意:
将
from: noreply@mail.mf8.biz
set mailserver smtpdm.aliyun.com port 465 username noreply@mail.mf8.biz password "your-smtp-password"
```bash
set alert webmaster@wp-bullet.com
设置为自己使用的邮箱,推荐参考教程: 使用邮件推送服务设置 WP SMTP 发件





