open-falcon郵件告警配置

2019年1月30日11:12:31 發(fā)表評論 7,318 ℃

1、直接下載二進制包

#wget http://cactifans.hi-www.com/open-falcon/mail-provider.tar.gz


2、創(chuàng)建工作目錄,最好創(chuàng)建在open-falcon目錄下面,方便管理

#mkdir -p /usr/local/open-falcon/mail-provider

#tar zxf  mail-provider.tar.gz -C /usr/local/open-falcon/mail-provider/

#cd  /usr/local/open-falcon/mail-provider

#vim cfg.json

open-falcon郵件告警配置

"addr": "mail.example.com:25",      #郵箱的smtp地址

"username": "falcon@example.com",   #郵箱

"password": "123456",               #郵箱密碼

"from": "falcon@example.com"        #發(fā)件人  


3、創(chuàng)建falcon-mail-provider  的快捷方式,否則無法啟動,腳本里面執(zhí)行的falcon-mail-provider文件,而不是mail-provider

#ln -sv mail-provider falcon-mail-provider


4、啟動服務(wù)

#./control start

#lsof -i:4000

COMMAND    PID USER   FD   TYPE DEVICE SIZE/OFF NODE NAME

falcon-ma 8814 root    3u  IPv6  88289      0t0  TCP *:terabase (LISTEN)


5、測試郵件發(fā)送。

#curl http://127.0.0.1:4000/sender/mail -d "tos=xxxx@qq.com&subject=測試郵件&content=你好世界!"

open-falcon郵件告警配置


6、配置alarm模塊的配置文件cfg.json

#vim alarm/config/cfg.json

open-falcon郵件告警配置

#./open-falcon restart alarm


7、open-falcon設(shè)置,告警測試。

①在模板里面添加一個端口監(jiān)控。

open-falcon郵件告警配置

②過幾分鐘以后可以查看告警列表。

open-falcon郵件告警配置

③同時收到郵件

open-falcon郵件告警配置

④如果沒有微信沒有收到信息,可以通過 ./open-falcon monitor alarm查看日志。

【騰訊云】云服務(wù)器、云數(shù)據(jù)庫、COS、CDN、短信等云產(chǎn)品特惠熱賣中

發(fā)表評論

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: