-
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.
fix(agent): ensure self-monitoring throttle resets at the end of inte…
…rval (#173)
- Loading branch information
1 parent
e3df479
commit df26efd
Showing
6 changed files
with
117 additions
and
11 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
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
38 changes: 38 additions & 0 deletions
38
src/agent/test/FT/fixtures/self-monitoring-interval/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,38 @@ | ||
{ | ||
"loki": { | ||
"apiUrl": "http://localhost:3100" | ||
}, | ||
"notifiers": { | ||
"discord": { | ||
"notifier": "../../test/FT/mocks/sigyn-test-notifier.js", | ||
"webhookUrl": "https://discord.com/api/webhooks/aaa/bbb" | ||
} | ||
}, | ||
"rules": [ | ||
{ | ||
"name": "State KO >= 80%", | ||
"logql": "{app=\"sigyn\"} |~ `state: (ok|ko)` | regexp `state: (?P<state>ok|ko)`", | ||
"polling": "200ms", | ||
"alert": { | ||
"on": { | ||
"label": "state", | ||
"value": "ko", | ||
"percentThreshold": 80, | ||
"minimumLabelCount": 10 | ||
}, | ||
"template": { | ||
"title": "Alert" | ||
} | ||
} | ||
} | ||
], | ||
"selfMonitoring": { | ||
"notifiers": ["discord"], | ||
"template": { | ||
"title": "foo" | ||
}, | ||
"throttle": { | ||
"interval": "5s" | ||
} | ||
} | ||
} |
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