mirror of https://github.com/openspug/spug
F 修复钉钉告警联系人过滤规则错误的问题
parent
7194076073
commit
5e816be889
|
@ -10,7 +10,7 @@ import requests
|
||||||
import json
|
import json
|
||||||
|
|
||||||
spug_server = 'http://spug-wx.qbangmang.com'
|
spug_server = 'http://spug-wx.qbangmang.com'
|
||||||
notify_source = 'info-circle'
|
notify_source = 'monitor'
|
||||||
|
|
||||||
|
|
||||||
def _parse_args(grp):
|
def _parse_args(grp):
|
||||||
|
@ -65,7 +65,7 @@ def notify_by_dd(event, subject, grp):
|
||||||
if not spug_key:
|
if not spug_key:
|
||||||
Notify.make_notify(notify_source, '1', '发送报警信息失败', '未配置报警服务调用凭据,请在系统管理/系统设置/报警服务设置中配置。')
|
Notify.make_notify(notify_source, '1', '发送报警信息失败', '未配置报警服务调用凭据,请在系统管理/系统设置/报警服务设置中配置。')
|
||||||
return
|
return
|
||||||
users = set(x.ding for x in Contact.objects.filter(id__in=u_ids, email__isnull=False))
|
users = set(x.ding for x in Contact.objects.filter(id__in=u_ids, ding__isnull=False))
|
||||||
if users:
|
if users:
|
||||||
texts = [
|
texts = [
|
||||||
'## %s ## ' % '监控告警通知' if event == '1' else '告警恢复通知',
|
'## %s ## ' % '监控告警通知' if event == '1' else '告警恢复通知',
|
||||||
|
|
Loading…
Reference in New Issue