forked from k8stech/alertmanager-wechatrobot-webhook
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtestSendwechat.sh
51 lines (51 loc) · 2.22 KB
/
testSendwechat.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
curl -X POST \
-H "Content-Type: application/json" \
-d '{
"version": "4",
"groupKey": "{}:{alertname=\"node节点cpu使用率过高\"}",
"status": "firing",
"Receiver": "webhook",
"GroupLabels": {
"alertname": "node节点cpu使用率过高"
},
"CommonLabels": {
"alertname": "node节点cpu使用率过高",
"container": "kube-rbac-proxy",
"endpoint": "https",
"instance": "172.32.2.191",
"job": "node-exporter",
"namespace": "monitoring",
"pod": "node-exporter-8xpz6",
"prometheus": "monitoring/k8s",
"service": "node-exporter",
"severity": "warning"
},
"CommonAnnotations": {
"description": "集群名称:储能-ems-cn node名称:172.32.2.191 cpu使用率超过85%,当前值:4%",
"summary": "node节点cpu使用率过高"
},
"ExternalURL": "http://alertmanager-main-0:9093",
"Alerts": [
{
"labels": {
"alertname": "node节点cpu使用率过高",
"container": "kube-rbac-proxy",
"endpoint": "https",
"instance": "172.32.2.191",
"job": "node-exporter",
"namespace": "monitoring",
"pod": "node-exporter-8xpz6",
"prometheus": "monitoring/k8s",
"service": "node-exporter",
"severity": "warning"
},
"Annotations": {
"description": "集群名称:储能-ems-cn node名称:172.32.2.191 cpu使用率超过85%,当前值:4%",
"summary": "node节点cpu使用率过高"
},
"startsAt": "2024-09-10T06:47:48.741Z",
"endsAt": "0001-01-01T00:00:00Z"
}
]
}
' http://10.40.61.135:8999/webhook\?key\=77d13f