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

Enhancement: Re-design alerts #1049

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

parmesant
Copy link
Contributor

Description

Alerts used to be linked to a logstream and were based on an expression based logic With this PR, alerts will be independent of logstreams and will be based on a SQL query The given threshold config will get evaluated against the result of the query and the target config will be used to send out notifications


TODO:

  • Unit tests
  • Merge target notification task with Alerts

This PR has:

  • been tested to ensure log ingestion and log query works.
  • added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader.
  • added documentation for new or modified features or behaviors.

@parmesant parmesant marked this pull request as draft December 22, 2024 11:00
@coveralls
Copy link

coveralls commented Dec 23, 2024

Pull Request Test Coverage Report for Build 12511034600

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 0 of 661 (0.0%) changed or added relevant lines in 14 files are covered.
  • 83 unchanged lines in 7 files lost coverage.
  • Overall coverage decreased (-1.2%) to 10.325%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/handlers/http/logstream.rs 0 1 0.0%
src/handlers/airplane.rs 0 2 0.0%
src/cli.rs 0 3 0.0%
src/rbac/role.rs 0 3 0.0%
src/query/mod.rs 0 7 0.0%
src/handlers/http/modal/query_server.rs 0 10 0.0%
src/storage/object_storage.rs 0 18 0.0%
src/handlers/http/query.rs 0 29 0.0%
src/handlers/http/modal/server.rs 0 36 0.0%
src/sync.rs 0 46 0.0%
Files with Coverage Reduction New Missed Lines %
src/alerts/mod.rs 1 0.0%
src/event/mod.rs 1 0.0%
src/storage/object_storage.rs 2 0.0%
src/metadata.rs 2 1.42%
src/rbac/role.rs 2 0.0%
src/alerts/target.rs 4 0.0%
src/option.rs 71 0.0%
Totals Coverage Status
Change from base Build 12465451984: -1.2%
Covered Lines: 1845
Relevant Lines: 17870

💛 - Coveralls

@parmesant parmesant marked this pull request as ready for review December 27, 2024 05:15
@nitisht
Copy link
Member

nitisht commented Dec 27, 2024

Please address the conflicts

parmesant and others added 7 commits January 2, 2025 08:13
Alerts used to be linked to a logstream and were based on an expression based logic
With this PR, alerts will be independent of logstreams and will be based on a SQL query
The given threshold config will get evaluated against the result of the query and
the target config will be used to send out notifications
Fixes parseablehq#936

---------

Signed-off-by: parmesant <[email protected]>
Co-authored-by: Nitish Tiwari <[email protected]>
Co-authored-by: Devdutt Shenoi <[email protected]>
- modified error message
- added filters in alerts
- added multiple alert conditions for one alert
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants