Merge pull request #1508 from andrein/alertmanager-deprecated-inhibition-rules

This commit is contained in:
Paweł Krupa
2021-11-16 16:23:57 +01:00
committed by GitHub
2 changed files with 18 additions and 26 deletions

View File

@@ -27,20 +27,12 @@ local defaults = {
resolve_timeout: '5m',
},
inhibit_rules: [{
source_match: {
severity: 'critical',
},
target_match_re: {
severity: 'warning|info',
},
source_matchers: ['severity = critical'],
target_matchers: ['severity =~ warning|info'],
equal: ['namespace', 'alertname'],
}, {
source_match: {
severity: 'warning',
},
target_match_re: {
severity: 'info',
},
source_matchers: ['severity = warning'],
target_matchers: ['severity = info'],
equal: ['namespace', 'alertname'],
}],
route: {
@@ -50,8 +42,8 @@ local defaults = {
repeat_interval: '12h',
receiver: 'Default',
routes: [
{ receiver: 'Watchdog', match: { alertname: 'Watchdog' } },
{ receiver: 'Critical', match: { severity: 'critical' } },
{ receiver: 'Watchdog', matchers: ['alertname = Watchdog'] },
{ receiver: 'Critical', matchers: ['severity = critical'] },
],
},
receivers: [

View File

@@ -17,17 +17,17 @@ stringData:
- "equal":
- "namespace"
- "alertname"
"source_match":
"severity": "critical"
"target_match_re":
"severity": "warning|info"
"source_matchers":
- "severity = critical"
"target_matchers":
- "severity =~ warning|info"
- "equal":
- "namespace"
- "alertname"
"source_match":
"severity": "warning"
"target_match_re":
"severity": "info"
"source_matchers":
- "severity = warning"
"target_matchers":
- "severity = info"
"receivers":
- "name": "Default"
- "name": "Watchdog"
@@ -40,10 +40,10 @@ stringData:
"receiver": "Default"
"repeat_interval": "12h"
"routes":
- "match":
"alertname": "Watchdog"
- "matchers":
- "alertname = Watchdog"
"receiver": "Watchdog"
- "match":
"severity": "critical"
- "matchers":
- "severity = critical"
"receiver": "Critical"
type: Opaque