prometheus / alertmanager

Prometheus Alertmanager
https://prometheus.io
Apache License 2.0
6.7k stars 2.17k forks source link

API status firing normal reception,but status resolved no data received #2375

Open PatrickGG opened 4 years ago

PatrickGG commented 4 years ago

flask api prometheus:2.18.2 alertmanager:0.18.0 centos7.2 3.10.0-327.el7.x86_64

`cat prometheus.yml global: scrape_interval: 15s # Set the scrape interval to every 15 seconds. Default is every 1 minute. evaluation_interval: 15s # Evaluate rules every 15 seconds. The default is every 1 minute. external_labels: monitor: 'codelab_monitor' alerting: alertmanagers:

rule_files:

scrape_configs:

`cat alertmanager.yml global: resolve_timeout: 5m

templates:

route: group_by: ['alertname'] group_wait: 10s group_interval: 10s repeat_interval: 1h receiver: 'web.hook' receivers:

inhibit_rules:

alertmanager logs: alertmanager: {"aggrGroup":"{}:{alertname=\"InstanceDown\"}","alerts":"[InstanceDown[34c8542][resolved]]","caller":"dispatch.go:430","component":"dispatcher","level":"debug","msg":"flushing","ts":"2020-09-17T03:01:50.911Z"}

api logs: {u'status': u'firing', u'groupLabels': {u'alertname': u'InstanceDown'}, u'groupKey': u'{}:{alertname="InstanceDown"}', u'commonAnnotations': {u'description': u'192.168.20.58:9100 of job server has been down for more than 5 minutes.', u'summary': u'Instance 192.168.20.58:9100 down'}, u'alerts': [{u'status': u'firing', u'labels': {u'instance': u'192.168.20.58:9100', u'job': u'server', u'monitor': u'codelab_monitor', u'alertname': u'InstanceDown', u'severity': u'error'}, u'endsAt': u'0001-01-01T00:00:00Z', u'generatorURL': u'http://Lan-Kvm-20058-GuangSql:9090/graph?g0.expr=up+%3D%3D+0&g0.tab=1', u'startsAt': u'2020-09-17T02:45:3 5.904147407Z', u'annotations': {u'description': u'192.168.20.58:9100 of job server has been down for more than 5 minutes.', u'summary': u'Instance 192.168.20.58:9100 down'}}], u'version': u'4', u'receiver': u'web\\.hook', u'externalURL': u'http://Lan-Kvm-20058-GuangSql:9093', u'commonLabels': {u'instance': u'192.168.20.58:9100', u'job': u'server', u'monitor': u'codelab_monitor', u'alertname': u'InstanceDown', u'severity': u'error'}}

status resolved no data received ?

simonpasquier commented 4 years ago

I'm not sure to understand exactly what problem you encounter. But can you try with the latest version of Alertmanager and Prometheus?