Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Alertmanager Woa Webhook

推送告警到金山协作

How To Use

cd cmd/webhook
go build
webhook -defaultRobot=https://xz.wps.cn/api/v1/webhook/send?key=xxx -cluster xxx
go run webhook.go -defaultRobot=https://xz.wps.cn/api/v1/webhook/send?key=xxx -cluster xxx
  • -defaultRobot: default dingtalk webhook url, all notifaction from alertmanager will direct to this webhook address.

Or you can overwrite by add annotations to Prometheus alertrule to special the woa webhook for each alert rule.

groups:
- name: hostStatsAlert
  rules:
  - alert: hostCpuUsageAlert
    expr: sum(avg without (cpu)(irate(node_cpu{mode!='idle'}[5m]))) by (instance) > 0.85
    for: 1m
    labels:
      severity: page
    annotations:
      summary: "Instance {{ $labels.instance }} CPU usgae high"
      description: "{{ $labels.instance }} CPU usage above 85% (current value: {{ $value }})"
      woaRobot: "https://xz.wps.cn/api/v1/webhook/send?key=xxx"

About

No description, website, or topics provided.

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages