open-falcon邮件告警配置-创新互联
1、下载二进制安装包
创新互联-专业网站定制、快速模板网站建设、高性价比安岳网站开发、企业建站全套包干低至880元,成熟完善的模板库,直接使用。一站式安岳网站制作公司更省心,省钱,快速模板网站建设找我们,业务覆盖安岳地区。费用合理售后完善,10余年实体公司更值得信赖。cd /home/work/go/src/github.com/open-falcon wget https://dl.cactifans.com/open-falcon/falcon-mail-provider.tar.gz mkdir -p falcon-mail-provider tar zxvf falcon-mail-provider.tar.gz -C falcon-mail-provider cd falcon-mail-provider2、配置文件修改
{ "debug": true, "http": { "listen": "0.0.0.0:4000", "token": "" }, "smtp": { "addr": "smtp.qiye.163.com:25", "username": "xxamp@xxamp.com", "password": "youpassword", "from": "xxamp@xxamp.com", "tls":false, "anonymous":false, "skipVerify":true } }3、测试配置
./control start [root@mgr falcon-mail-provider]# ./control tail 2019/09/18 11:46:00 config.go:71: load configuration file cfg.json successfully 2019/09/18 11:46:00 http.go:25: http listening 0.0.0.0:4000 [root@mgr falcon-mail-provider]# curl http://127.0.0.1:4000/sender/mail -d "tos=xingzhenxiang@qq.com,xingzhenxiang@163.com&subject=xx&content=yy" success [root@mgr falcon-mail-provider]#4、配置alarm模块的配置文件cfg.json,修改"mail": "http://127.0.0.1:4000/sender/mail"选项的url并重启
sed -i 's#http://127.0.0.1:10086/mail#http://127.0.0.1:4000/sender/mail#g' alarm/config/cfg.json [root@mgr open-falcon]# cat alarm/config/cfg.json { "log_level": "debug", "http": { "enabled": true, "listen": "0.0.0.0:9912" }, "redis": { "addr": "127.0.0.1:6379", "maxIdle": 5, "highQueues": [ "event:p0", "event:p1", "event:p2" ], "lowQueues": [ "event:p3", "event:p4", "event:p5", "event:p6" ], "userIMQueue": "/queue/user/im", "userSmsQueue": "/queue/user/sms", "userMailQueue": "/queue/user/mail" }, "api": { "im": "http://127.0.0.1:10086/wechat", "sms": "http://127.0.0.1:10086/sms", "mail": "http://127.0.0.1:4000/sender/mail", "dashboard": "http://127.0.0.1:8081", "plus_api":"http://127.0.0.1:8080", "plus_api_token": "default-token-used-in-server-side" }, "falcon_portal": { "addr": "root:@tcp(127.0.0.1:3306)/alarms?charset=utf8&loc=Local", "idle": 10, "max": 100 }, "worker": { "im": 10, "sms": 10, "mail": 50 }, "housekeeper": { "event_retention_days": 7, "event_delete_batch": 100 } } [root@mgr open-falcon]# ./open-falcon restart alarm5、配置报警模板
5.1 在红框里面输入模板名称,并点击+
5.2填写具内容
6、配置监控模板和hostgroup关联
6.1
6.2
6.3
7、未恢复告警查看,绑定完成要等几分钟,建议十分钟后查看
8、邮件信息,xx是测试邮件信息
另外有需要云服务器可以了解下创新互联cdcxhl.cn,海内外云服务器15元起步,三天无理由+7*72小时售后在线,公司持有idc许可证,提供“云服务器、裸金属服务器、高防服务器、香港服务器、美国服务器、虚拟主机、免备案服务器”等云主机租用服务以及企业上云的综合解决方案,具有“安全稳定、简单易用、服务可用性高、性价比高”等特点与优势,专为企业上云打造定制,能够满足用户丰富、多元化的应用场景需求。
网站栏目:open-falcon邮件告警配置-创新互联
分享URL:http://hbruida.cn/article/pchpg.html