gatus
gatus copied to clipboard
Feature/Severity status
Summary
This PR has been inspired by: https://github.com/TwiN/gatus/issues/227, https://github.com/TwiN/gatus/issues/412
- [x] Added
ConditionResult.Severity
- [x] Added
Result.Severity
- [x] Added
Result.SeverityStatus
- [x] Added
Result#determineSeverityStatus
, tests - [x] Added
SeverityStatus
type - [x] Added
Condition#sanitizeSeverityCondition
, tests - [x] Updated
Condition#evaluate
, tests - [x] Updated
Endpoint#EvaluateHealth
, tests - [x] Updated
AlertProvider#buildRequestBody
, tests - [x] Updated storage adapters
- [x] Updated Endpoint component (vue)
- [x] Recompiled js assets
- [x] Updated readme
Screenshorts
Checklist
- [x] Tested and/or added tests to validate that the changes work as intended, if applicable.
- [x] Updated documentation in
README.md
, if applicable.
This PR covers "Support severity for PagerDuty" feature: https://github.com/TwiN/gatus/issues/412
I am interested in this feature so I will make a review and propose some changes.
Please note that I am not a maintainer and my views may different than TwiN's.
@bestwebua Can we work together? I didn't know you were active and I made most of changes from my review here: https://github.com/Exagone313/gatus/tree/severity-status
A notable change is that I simplified how the severity is computed from the results, there is a field severity
on both condition results and results now.
I also made various improvements in the code (for example, the switch
were needlessly making boolean comparisons).
I think commits could be squashed, as long as Co-Authored-By
lines are added adequately.
@Exagone313 Of course I'm active. I have received your comments just today. Thanks, let it be. So what the next actions?
So what the next actions?
Are you up for a pair programming session on Jitsi (or something like that)? I think it would be best to be able to share some code in real time.
@Exagone313 Sorry, today I'm not able to pair session. But we can combine our commits in the different branch and make a review.
In my branch there are still some issues or improvements to be made:
- For now I only tested the volatile storage and database needs to be more thoroughly tested (on both SQLite and PostgreSQL).
- I don't save severity for each condition results in the database (I think it is needed).
- I haven't added yet support for alert severity level threshold.
- I haven't added severity support for GitLab provider and other alerting providers that could support it.
is there any chance of progress of this pull request or it's abandoned? This feature is essential for real world monitoring system.
I was thinking about taking over the PR but I have been working on other things, I may tackle it again in a few weeks though.