alertmanager icon indicating copy to clipboard operation
alertmanager copied to clipboard

"repeat_interval=1h",but i still going to get a repeat alarm in a short time

Open dengceltics opened this issue 7 years ago • 12 comments

my alertmanager.yml

global:
  resolve_timeout: 5m
route:
  group_by: ['alertname']
  group_wait: 30s
  group_interval: 5m
  repeat_interval: 3h
  receiver: 'web.hook'
receivers:
- name: 'web.hook'
  webhook_configs:
  - url: 'http://*****:3000'
    send_resolved: false

The repeat alarm is:

{ '{"receiver":"web\\.hook","status":"resolved","alerts":[{"status":"resolved","labels":{"alertname":"TooMuchGoroutines","app":"prometheus","component":"core","instance":"10.233.118.160:9090","job":"kubernetes-endpoints","kubernetes_name":"prometheus","kubernetes_namespace":"monitoring","severity":"warning"},"annotations":{"description":"testing","summary":"too much goroutines of job prometheus."},"startsAt":"2018-12-27T06:53:30.090023826Z","endsAt":"2018-12-28T01:30:30.090023826Z","generatorURL":"http://prometheus-core-6b5dc8dd4d-z4dvl:9090/graph?g0.expr': 'go_goroutines > 100\\u0026g0.tab=1"}],"groupLabels":{"alertname":"TooMuchGoroutines"},"commonLabels":{"alertname":"TooMuchGoroutines","app":"prometheus","component":"core","instance":"10.233.118.160:9090","job":"kubernetes-endpoints","kubernetes_name":"prometheus","kubernetes_namespace":"monitoring","severity":"warning"},"commonAnnotations":{"description":"testing","summary":"too much goroutines of job prometheus."},"externalURL":"http://alertmanager-56797bdb65-x9sj5:9093","version":"4","groupKey":"{}:{alertname=\\"TooMuchGoroutines\\"}"}\n' }
{ '{"receiver":"web\\.hook","status":"firing","alerts":[{"status":"firing","labels":{"alertname":"TooMuchGoroutines","app":"prometheus","component":"core","instance":"10.233.118.160:9090","job":"kubernetes-endpoints","kubernetes_name":"prometheus","kubernetes_namespace":"monitoring","severity":"warning"},"annotations":{"description":"testing","summary":"too much goroutines of job prometheus."},"startsAt":"2018-12-27T06:53:30.090023826Z","endsAt":"2018-12-28T01:36:30.090023826Z","generatorURL":"http://prometheus-core-6b5dc8dd4d-z4dvl:9090/graph?g0.expr': 'go_goroutines > 100\\u0026g0.tab=1"}],"groupLabels":{"alertname":"TooMuchGoroutines"},"commonLabels":{"alertname":"TooMuchGoroutines","app":"prometheus","component":"core","instance":"10.233.118.160:9090","job":"kubernetes-endpoints","kubernetes_name":"prometheus","kubernetes_namespace":"monitoring","severity":"warning"},"commonAnnotations":{"description":"testing","summary":"too much goroutines of job prometheus."},"externalURL":"http://alertmanager-56797bdb65-x9sj5:9093","version":"4","groupKey":"{}:{alertname=\\"TooMuchGoroutines\\"}"}\n' }
{ '{"receiver":"web\\.hook","status":"resolved","alerts":[{"status":"resolved","labels":{"alertname":"TooMuchGoroutines","app":"prometheus","component":"core","instance":"10.233.118.160:9090","job":"kubernetes-endpoints","kubernetes_name":"prometheus","kubernetes_namespace":"monitoring","severity":"warning"},"annotations":{"description":"testing","summary":"too much goroutines of job prometheus."},"startsAt":"2018-12-27T06:53:30.090023826Z","endsAt":"2018-12-28T01:36:30.090023826Z","generatorURL":"http://prometheus-core-6b5dc8dd4d-z4dvl:9090/graph?g0.expr': 'go_goroutines > 100\\u0026g0.tab=1"}],"groupLabels":{"alertname":"TooMuchGoroutines"},"commonLabels":{"alertname":"TooMuchGoroutines","app":"prometheus","component":"core","instance":"10.233.118.160:9090","job":"kubernetes-endpoints","kubernetes_name":"prometheus","kubernetes_namespace":"monitoring","severity":"warning"},"commonAnnotations":{"description":"testing","summary":"too much goroutines of job prometheus."},"externalURL":"http://alertmanager-56797bdb65-x9sj5:9093","version":"4","groupKey":"{}:{alertname=\\"TooMuchGoroutines\\"}"}\n' }

The alarm always turn firing to resolved ,and turn resolved to firing.But the metrics hasn't changed.

dengceltics avatar Dec 28 '18 01:12 dengceltics

Please provide Prometheus and AlertManager versions. What is the alerting rule definition?

simonpasquier avatar Jan 10 '19 13:01 simonpasquier

The alerts will be sent repeatedly when your webhook not return 200.

aixeshunter avatar Jan 25 '19 01:01 aixeshunter

same problem, how to solve? screenshot-3

beijiaxu avatar Apr 25 '19 09:04 beijiaxu

same problem, how to solve? screenshot-3

what is your version?

aixeshunter avatar Apr 26 '19 01:04 aixeshunter

same problem, how to solve? screenshot-3

what is your version?

it was AlertManger: 0.15.2, Prometheus: 2.3.2 But current environment also has same problem, AlertManger: 0.16.1, Prometheus: 2.6.0

beijiaxu avatar Apr 26 '19 02:04 beijiaxu

same problem, how to solve? screenshot-3

what is your version?

it was AlertManger: 0.15.2, Prometheus: 2.3.2 But current environment also has same problem, AlertManger: 0.16.1, Prometheus: 2.6.0

Please show me your alertmanager.yaml :)

aixeshunter avatar Apr 29 '19 01:04 aixeshunter

@aixeshunter this is alertmanager.yml

global:
  resolve_timeout: 5m
inhibit_rules:
- equal:
  - alertname
  - job
  source_match:
    severity: critical
  target_match:
    severity: warning
receivers:
- name: smartcmp-default-webhook
  webhook_configs:
  - url: http://hpuliyang.natapp1.cc/alarm-activities/trigger   
route:
  continue: false
  group_by:
  - alertname
  - cluster
  - service
  group_interval: 1s 
  group_wait: 1s 
  receiver: smartcmp-default-webhook
  repeat_interval: 4h
  routes: []
templates:
- template/*.tmpl

I changed group_wait & group_interval to 15s & 1m, but it didn't work...

beijiaxu avatar Apr 29 '19 02:04 beijiaxu

Hi @beijiaxu, are u sure this webhook,

  webhook_configs:
  - url: http://hpuliyang.natapp1.cc/alarm-activities/trigger 

it handles the alerts and sends status code 200 back to alertmanager?

aixeshunter avatar Apr 29 '19 08:04 aixeshunter

Hi @beijiaxu, are u sure this webhook,

  webhook_configs:
  - url: http://hpuliyang.natapp1.cc/alarm-activities/trigger 

it handles the alerts and sends status code 200 back to alertmanager?

yes, in fact this url is localhost. This service receive many requests in a few minutes...

And this problem rarely happen until I use alert for k8s containers, prometheus fires alerts for more than 10 targets at the same time...

beijiaxu avatar Apr 29 '19 10:04 beijiaxu

Same issue in alertmanager 0.18 - any update?

dbabits avatar Jan 20 '20 19:01 dbabits

Closing this because the original reporter didn't add enough details to demonstrate that there's a problem with Alertmanager.

simonpasquier avatar Jan 21 '20 10:01 simonpasquier

Same issue in alertmanager 0.21.0 - any update?

Gaozizhong avatar Mar 27 '23 08:03 Gaozizhong