-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(config): compositeRules severity filters (#245)
- Loading branch information
1 parent
4c47fde
commit fc97eed
Showing
11 changed files
with
508 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
107 changes: 107 additions & 0 deletions
107
src/agent/test/FT/fixtures/composite-rules-sev-filters/sigyn.config.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
{ | ||
"loki": { | ||
"apiUrl": "http://localhost:3100" | ||
}, | ||
"grafana": { | ||
"apiUrl": "http://localhost:3000" | ||
}, | ||
"notifiers": { | ||
"discord": { | ||
"notifier": "discord", | ||
"webhookUrl": "https://discord.com/api/webhooks/aaa/bbb" | ||
} | ||
}, | ||
"rules": [ | ||
{ | ||
"name": "A. Critical severity", | ||
"logql": "{env=\"preprod\"} |= `my super logql`", | ||
"polling": "200ms", | ||
"alert": { | ||
"on": { | ||
"count": "1", | ||
"interval": "1s" | ||
}, | ||
"severity": "critical", | ||
"template": { | ||
"title": "{ruleName} - Triggered {counter} times!", | ||
"content": [ | ||
"- LogQL: {logql}" | ||
] | ||
} | ||
} | ||
}, | ||
{ | ||
"name": "B. Information severity", | ||
"logql": "{env=\"preprod\"} |= `my super logql`", | ||
"polling": "200ms", | ||
"alert": { | ||
"on": { | ||
"count": "1", | ||
"interval": "1s" | ||
}, | ||
"severity": "info", | ||
"template": { | ||
"title": "{ruleName} - Triggered {counter} times!", | ||
"content": [ | ||
"- LogQL: {logql}" | ||
] | ||
} | ||
} | ||
}, | ||
{ | ||
"name": "C. Error severity", | ||
"logql": "{env=\"preprod\"} |= `my super logql`", | ||
"polling": "200ms", | ||
"alert": { | ||
"on": { | ||
"count": "1", | ||
"interval": "1s" | ||
}, | ||
"severity": "error", | ||
"template": { | ||
"title": "{ruleName} - Triggered {counter} times!", | ||
"content": [ | ||
"- LogQL: {logql}" | ||
] | ||
} | ||
} | ||
}, | ||
{ | ||
"name": "D. Critical severity", | ||
"logql": "{env=\"preprod\"} |= `my super logql`", | ||
"polling": "200ms", | ||
"alert": { | ||
"on": { | ||
"count": "1", | ||
"interval": "1s" | ||
}, | ||
"severity": "critical", | ||
"template": { | ||
"title": "{ruleName} - Triggered {counter} times!", | ||
"content": [ | ||
"- LogQL: {logql}" | ||
] | ||
} | ||
} | ||
} | ||
], | ||
"compositeRules": [ | ||
{ | ||
"name": "Composite Rule Based on Severity", | ||
"template": { | ||
"title": "title", | ||
"content": ["content"] | ||
}, | ||
"notifCount": 6, | ||
"throttle": { | ||
"interval": "5m", | ||
"count": 3 | ||
}, | ||
"ruleCountThreshold": 2, | ||
"muteRules": true, | ||
"filters": { | ||
"severity": ["critical", "error"] | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.