通过企业微信接收告警
Last updated
Last updated
# Alertmanager configuration
alerting:
alertmanagers:
- static_configs:
- targets:
- localhost:9093
rule_files:
- "rules.yml"
scrape_configs:
- job_name: 'node'
static_configs:
- targets: ['localhost:9100']groups:
- name: node
rules:
- alert: server_status
expr: up{job="node"} == 0
for: 15s
annotations:
summary: "机器 {{ $labels.instance }} 挂了"route:
group_by: ['alertname']
receiver: 'wechat'
receivers:
- name: 'wechat'
wechat_configs:
- corp_id: 'xxx'
to_party: '1'
agent_id: '1000002'
api_secret: 'xxxx'