gatus icon indicating copy to clipboard operation
gatus copied to clipboard

Feature/Severity status

Open bestwebua opened this issue 1 year ago • 9 comments

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

Screenshot 2023-05-22 at 12 13 42 PM Screenshot 2023-05-22 at 12 13 50 PM Screenshot 2023-05-22 at 12 13 56 PM

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.

bestwebua avatar May 22 '23 13:05 bestwebua

This PR covers "Support severity for PagerDuty" feature: https://github.com/TwiN/gatus/issues/412

bestwebua avatar Jun 27 '23 15:06 bestwebua

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.

Exagone313 avatar Jul 15 '23 20:07 Exagone313

@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 avatar Jul 16 '23 11:07 Exagone313

@Exagone313 Of course I'm active. I have received your comments just today. Thanks, let it be. So what the next actions?

bestwebua avatar Jul 16 '23 11:07 bestwebua

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 avatar Jul 16 '23 12:07 Exagone313

@Exagone313 Sorry, today I'm not able to pair session. But we can combine our commits in the different branch and make a review.

bestwebua avatar Jul 16 '23 13:07 bestwebua

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.

Exagone313 avatar Jul 16 '23 13:07 Exagone313

is there any chance of progress of this pull request or it's abandoned? This feature is essential for real world monitoring system.

ser avatar Apr 27 '24 11:04 ser

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.

Exagone313 avatar Apr 27 '24 20:04 Exagone313