Repository navigation
missing agentid #1218
Copy link
Copy link
Closed
Description
System information:
Linux ha-1 3.10.0-693.11.1.el7.x86_64 #1 SMP Mon Dec 4 23:52:40 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
Alertmanager version:latest
Prometheus version:2.0
WeChat:latest
Alertmanager configuration file:
apiVersion: v1
kind: ConfigMap
metadata:
name: alertmanager
namespace: default
data:
config.yml: |-
global:
smtp_smarthost: 'smtp.qq.com:25'
smtp_from: '***********@qq.com'
smtp_auth_username: '1027155512@qq.com'
smtp_auth_password: '*************'
wechat_api_secret: '********************************'
wechat_api_corp_id: '**************************'
templates:
- '/etc/alert/default.tmpl'
route:
receiver: 'default-receiver'
group_by: ['alertname', 'cluster', 'service']
group_wait: 30s
group_interval: 5m
repeat_interval: 15m
receivers:
- name: 'email_alert'
email_configs:
- to: '***********@139.com'
- name: 'default-receiver'
email_configs:
- to: '***********@139.com'
wechat_configs:
- agent_id: '1000002'
to_user: '*******'
to_party: '2'
corp_id: '**********'
my alertmanager on k8s 1.8.1 . when i use wechat alarm, i can`t receive any message, then, I found the following error through the dashboard
level=debug ts=2018-01-30T09:20:46.481211313Z caller=impl.go:910 msg="response: {\"errcode\":41011,\"errmsg\":\"missing agentid, hint: [1517304046_5_3f158368fdce3d37301495e4190372f1], more info at https://open.work.weixin.qq.com/devtool/query?e=41011\"}" incident="{}:{alertname=\"node_memory_low\"}"
but if i change this place ,all every look likes ok
notify/impl.go
before
default:
msg = &weChatCreateMessage{
Text: weChatMessage{
Content: tmpl(n.conf.Message),
},
ToUser: tmpl(n.conf.ToUser),
ToParty: tmpl(n.conf.ToParty),
Totag: tmpl(n.conf.ToTag),
AgentID: tmpl(n.conf.AgentID),
Type: "text",
Safe: "0",
after
default:
msg = &weChatCreateMessage{
Text: weChatMessage{
Content: tmpl(n.conf.Message),
},
ToUser: tmpl(n.conf.ToUser),
ToParty: n.conf.ToParty,
Totag: tmpl(n.conf.ToTag),
AgentID: n.conf.AgentID,
Type: "text",
Safe: "0",
so i think it maybe a bug,please fix it,thanks
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Activity
stuartnelson3 commentedon Jan 30, 2018
@berlinsaint
stuartnelson3 commentedon Feb 6, 2018
Feel free to open a PR
songjiayang commentedon Feb 7, 2018
cool, I want to have a check.