本帖最后由 RACH 于 2021-11-29 17:12 编辑
最新 1.2配置文件说明
- {
- "debug": false, //调试模式
- "servername":"watcher",
- //监听频率单位毫秒 1秒为 1000
- "watch_frequency":3000,
- //连接端口超时时间
- "timeout":5000,
- //要监听的服务器,尽量使用IP
- "servers": [
- "127.0.0.1:3306",
- "127.0.0.1:22",
- //建议使用此种 方式
- {
- "name":"WEB",
- "host":"127.0.0.1",
- "port":"80",
- "onerror":{
- //出现故障访问的链接
- "url":"http://www.baidu.com",
- //出现故障执行的命令
- "cmd":"cd ${CUR}"
- }
- }
- ],
- //出现故障多少次时发送邮件可适当调整此参数,减少网络波动误报
- "errr_frequency":3,
- //出现故障时,发送邮件间隔 调整此参数 减少邮件骚扰
- "sendmailspan":1,
- "titletpl":"${CUR}/tpls/title.html", //消息标题模板
- "messagetpl":"${CUR}/tpls/message.html", //正文模板
- "emails":[
- "1327444968@qq.com",
- "1327444968@qq.com"
- ],
- "mailconfig":{
- "smtp": "smtp.exmail.qq.com",
- "username": "",
- "password": "",
- "aliasName": "Master"
- }
- }
复制代码 |