-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inhibition rule not working #4205
Comments
I haven't been able to reproduce this I'm afraid, it works for me. Here is the configuration file: receivers:
- name: test
route:
receiver: test
inhibit_rules:
- source_match:
alertname: "BlackboxProbeFailed"
target_match_re:
severity: "very high|high|warning"
equal: ["hostname"]
- source_match:
alertname: "Network-Down"
target_match_re:
alertname: "BlackboxProbeFailed|Host-DOWN|prometheus-heartbeat"
equal: ["category"]
- source_match:
alertname: "Test-service-cron"
target_match_re:
alertname: "Test-service-sshd" I added the two alerts:
The debug logs show
And so does the API: [
{
"annotations": {},
"endsAt": "2025-01-16T10:54:51.561Z",
"fingerprint": "643222c68932c063",
"receivers": [
{
"name": "test"
}
],
"startsAt": "2025-01-16T10:49:51.561Z",
"status": {
"inhibitedBy": [
"8bc38d5516aaa89d"
],
"mutedBy": [],
"silencedBy": [],
"state": "suppressed"
},
"updatedAt": "2025-01-16T10:49:51.561Z",
"labels": {
"alertname": "Test-service-sshd"
}
},
{
"annotations": {},
"endsAt": "2025-01-16T10:54:47.624Z",
"fingerprint": "8bc38d5516aaa89d",
"receivers": [
{
"name": "test"
}
],
"startsAt": "2025-01-16T10:49:47.624Z",
"status": {
"inhibitedBy": [],
"mutedBy": [],
"silencedBy": [],
"state": "active"
},
"updatedAt": "2025-01-16T10:49:47.624Z",
"labels": {
"alertname": "Test-service-cron"
}
}
] Could you do the equivalent test and share the debug logs from your Alertmanager, so we can compare? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We have some inhibition rules that are working as expected, but we are trying to add a new inhibition rule without the "equal" field, and it is not working. We also tested the new rule with the "equal" field like the other rules, but it still did not work.
Working Rules:
New rule is added after the above rules without equal field:
Below are test alerting rules created for the same:
To test the new rule, we first stopped the cron service. Once the "Test-service-cron" alert was fired, we stopped the sshd service. However, the "Test-service-sshd" alert also fired, indicating that the inhibition rule is not working as expected. The inhibition rule should suppress the target alert, but it did not. We verified the alert firing status through the "ALERTS" metric.
Questions:
The text was updated successfully, but these errors were encountered: