prometheus / prometheus/alertmanager
multiple resolved alerts
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 8.6k
- Forks
- 2.5k
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 61
Description
What did you do?
Exec flow script to send alerts to alertmanager every 1m
alerts='[
{
"labels": {
"instance": "10.70.58.29:9100",
"alertname": "DiskRunningFull",
"instance_name": "host1"
},
"annotations": {
"trigger_value": "0"
},
"startsAt": "2021-10-08T07:13:40.342408949Z",
"endsAt": "2021-10-09T07:14:40.342408949Z"
},
{
"labels": {
"alertname": "DiskRunningFull",
"instance": "10.70.58.30:9100",
"instance_name": "host2"
},
"annotations": {
"trigger_value": "0"
},
"startsAt": "2021-10-08T07:13:40.342408949Z",
"endsAt": "2021-10-08T07:14:40.342408949Z"
}]'
curl -XPOST -d"$alerts" http://localhost:9093/api/v1/alerts
What did you expect to see?
Only one resolved alert for host2.
What did you see instead? Under which circumstances?
Received multiple resolved alerts for host2 every 1m
Environment
- System information:
Linux 4.15.0-142-generic x86_64
- Alertmanager version:
0.19.0 & 0.23.0
- Alertmanager configuration file:
global:
resolve_timeout: 2m
route:
group_by: ['alertname']
group_wait: 10s
group_interval: 10s
repeat_interval: 1m
receiver: 'web.hook'
receivers:
- name: 'web.hook'
webhook_configs:
- url: 'http://127.0.0.1:5001/'
inhibit_rules:
- source_match:
severity: 'critical'
target_match:
severity: 'warning'
equal: ['alertname', 'dev', 'instance']```
* Prometheus configuration file:
insert configuration here (if relevant to the issue)
* Logs:
no logs output
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the behavior with the provided curl request to the Alertmanager /api/v1/alerts endpoint and the shown route configuration. Trace how repeated resolved alerts are grouped and repeated, then verify that the host2 scenario produces only one resolved alert while preserving expected behavior for the other alert.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- shell
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100