add more log

This commit is contained in:
UlricQin 2021-07-23 21:15:23 +08:00
parent a4c244cb61
commit bb148f9bea
2 changed files with 2 additions and 2 deletions

View File

@ -208,7 +208,7 @@ func notify(alertMsg AlertMsg) {
}
if err != nil {
logger.Errorf("notify: exec script %s occur error: %v", fpath, err)
logger.Errorf("notify: exec script %s occur error: %v, output: %s", fpath, err, buf.String())
return
}

View File

@ -5,6 +5,7 @@ import json
import os
import smtplib
import time
import requests
from email.mime.text import MIMEText
from email.header import Header
@ -29,7 +30,6 @@ from email.header import Header
# 3. 告警通道需要自行定义Send类中的send_xxx同名方法反射调用举例 event.notify_channels = [qq dingding] 则需要Send类中 有 send_qq send_dingding方法
# 4. im发群信息比如钉钉发群信息需要群的webhook机器人 token这个信息可以在user的contacts map中各个send_方法处理即可
# 5. 用户创建一个虚拟的用户保存上述im群 的机器人token信息 user的contacts map中
import requests
mail_host = "smtp.163.com"
mail_port = 994