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

View File

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