Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(alerting): Persist triggered alerts across application restart #764

Merged
merged 2 commits into from
May 16, 2024

Conversation

TwiN
Copy link
Owner

@TwiN TwiN commented May 15, 2024

Summary

Fixes #679

Checklist

  • Tested and/or added tests to validate that the changes work as intended, if applicable.
  • Updated documentation in README.md, if applicable.

@TwiN TwiN added feature New feature or request area/alerting Related to alerting area/storage Related to storage labels May 15, 2024
@codecov-commenter
Copy link

codecov-commenter commented May 15, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 71.14094% with 43 lines in your changes missing coverage. Please review.

Project coverage is 80.79%. Comparing base (9d151fc) to head (9ee83e7).
Report is 18 commits behind head on master.

Files Patch % Lines
storage/store/sql/sql.go 69.04% 21 Missing and 5 partials ⚠️
storage/store/memory/memory.go 0.00% 8 Missing ⚠️
watchdog/alerting.go 50.00% 3 Missing and 3 partials ⚠️
storage/store/sql/specific_sqlite.go 83.33% 1 Missing and 1 partial ⚠️
config/config.go 95.65% 1 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #764      +/-   ##
==========================================
+ Coverage   80.56%   80.79%   +0.23%     
==========================================
  Files          64       64              
  Lines        4249     4368     +119     
==========================================
+ Hits         3423     3529     +106     
- Misses        627      638      +11     
- Partials      199      201       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@TwiN TwiN merged commit f2c5f59 into master May 16, 2024
1 check passed
@TwiN TwiN deleted the feat/alert-persistence branch May 16, 2024 01:29
@LCerebo
Copy link

LCerebo commented May 16, 2024

@TwiN I tried you PR since I was trying to look at this feature myself. When I restart gatus for the second time I re-receive all the OK notification. The KO ones seems fine. Later today I will try to look more in detail your commit to give you some more details.

@TwiN
Copy link
Owner Author

TwiN commented May 17, 2024

@LCerebo Much appreciated! Due to the nature of the change, I will probably let it sit in latest for a few weeks in case somebody reports an issue with it.

TwiN added a commit that referenced this pull request May 17, 2024
github-merge-queue bot referenced this pull request in chezmoi-sh/atlas May 29, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Update | Change | OpenSSF |
|---|---|---|---|
| [TwiN/gatus](https://togithub.com/TwiN/gatus) | minor | `v5.10.0` ->
`v5.11.0` | [![OpenSSF
Scorecard](https://api.securityscorecards.dev/projects/github.com/TwiN/gatus/badge)](https://securityscorecards.dev/viewer/?uri=github.com/TwiN/gatus)
|

---

### Release Notes

<details>
<summary>TwiN/gatus (TwiN/gatus)</summary>

### [`v5.11.0`](https://togithub.com/TwiN/gatus/releases/tag/v5.11.0)

[Compare
Source](https://togithub.com/TwiN/gatus/compare/v5.10.0...v5.11.0)

##### What's Changed

- feat(alerting): Persist triggered alerts across application restart by
[@&#8203;TwiN](https://togithub.com/TwiN) in
[https://github.com/TwiN/gatus/pull/764](https://togithub.com/TwiN/gatus/pull/764)
- fix(alerting): Make Microsoft Teams title customizable by
[@&#8203;rahulchordiya](https://togithub.com/rahulchordiya) in
[https://github.com/TwiN/gatus/pull/731](https://togithub.com/TwiN/gatus/pull/731)
- refactor: Break core package into multiple packages under
config/endpoint by [@&#8203;TwiN](https://togithub.com/TwiN) in
[https://github.com/TwiN/gatus/pull/759](https://togithub.com/TwiN/gatus/pull/759)
- chore(deps): bump github.com/gofiber/fiber/v2 from 2.52.1 to 2.52.4 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/TwiN/gatus/pull/739](https://togithub.com/TwiN/gatus/pull/739)
- chore(deps): bump codecov/codecov-action from 4.3.0 to 4.4.0 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/TwiN/gatus/pull/765](https://togithub.com/TwiN/gatus/pull/765)

##### New Contributors

- [@&#8203;rahulchordiya](https://togithub.com/rahulchordiya) made their
first contribution in
[https://github.com/TwiN/gatus/pull/731](https://togithub.com/TwiN/gatus/pull/731)

**Full Changelog**:
TwiN/gatus@v5.10.0...v5.11.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/chezmoi-sh/atlas).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zNzcuOCIsInVwZGF0ZWRJblZlciI6IjM3LjM3Ny44IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/alerting Related to alerting area/storage Related to storage feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Alerts triggered status is not persistent
3 participants