Smokeping外置邮箱告警


 wget http://xrl.us/cpanm -O /usr/bin/cpanm

1.安装Authen::SASL模块 cpanm --mirror http://mirrors.163.com/cpan --mirror-only --force Authen::SASL
2.修改smokeping/lib/Smokeping.pm :

use Authen::SASL;
在sendmail中添加$smtp->auth(split(/\s*,\s*/, $cfg->{General}{mailusr}),split(/\s*,\s*/, $cfg->{General}{mailpwd}));
在_vars中添加mailusr mailpwd
3.配置文件修改
mailhost = smtp.163.com
mailusr = user@163.com
mailpwd = password
4.alert
to = 公司邮箱
from = user@163.com
5.添加几种新的告警
6.策略应用

 


 

posted @ 2017-10-23 16:16  qwerdf六连  阅读(446)  评论(0编辑  收藏  举报