alarm是个单点。对于未恢复的告警是放到alarm的内存中的,alarm还需要做报警合并,故而alarm只能部署一个实例。需要对alarm的存活做好监控。
配置文件必须叫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:10086/mail", //邮件发送网关地址
"dashboard": "http://127.0.0.1:8081", //dashboard模块的运行地址
"plus_api":"http://127.0.0.1:8080", //falcon-plus api模块的运行地址
"plus_api_token": "default-token-used-in-server-side" //用于和falcon-plus api模块服务端之间的通信认证token
},
"falcon_portal": {
"addr": "root:@tcp(127.0.0.1:3306)/alarms?charset=utf8&loc=Asia%2FChongqing",
"idle": 10,
"max": 100
},
"worker": {
"im": 10,
"sms": 10,
"mail": 50
},
"housekeeper": {
"event_retention_days": 7, //报警历史信息的保留天数
"event_delete_batch": 100
}
}
# 启动
./open-falcon start alarm
# 停止
./open-falcon stop alarm
# 查看日志
./open-falcon monitor alarm