Skip to content

Feature/create composite monitors#316

Open
stevanbz wants to merge 8 commits intoopensearch-project:feature/composite-monitorfrom
stevanbz:feature/create-composite-monitors
Open

Feature/create composite monitors#316
stevanbz wants to merge 8 commits intoopensearch-project:feature/composite-monitorfrom
stevanbz:feature/create-composite-monitors

Conversation

@stevanbz
Copy link
Copy Markdown
Contributor

@stevanbz stevanbz commented Jan 23, 2023

Description

This PR contains all the changes on SA plugin related with composite-monitor workflow scenario. This pr:

  • Extends the detector with [workflowIds field](Add field to store composite monitor id in detector document #226)
  • Contains the logic for workflow creation during the detector creation -> creates a workflow per detector, attaches a monitor delegates to it and assigns the workflow to a detector; in the case of failure workflow creation and monitor creation is reverted (follows the steps described here)
  • Contains the logic for workflow update - Updates a workflow considering the newly added/removed/updated monitor ids (follows the steps described here)
  • Deletes the workflow once the detector is being deleted by following the steps described here

Currently, for the time being, according to agreement made with @eirsep monitors are being assigned to a workflow in random order ie. there is no specific order that is being followed once the workflow is being created.

Useful links:
opensearch-project/alerting#524
opensearch-project/alerting#697

Issues Resolved

One pr is created that contains all the changes:

#219
#220
#226
#225
#222

It was done in step-by-step manner. The PR won't be merged before the workflows are enabled on the alerting plugin

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: Stevan Buzejic <buzejic.stevan@gmail.com>
…te class. Added integration tests that are used for monitor creation verfication

Signed-off-by: Stevan Buzejic <buzejic.stevan@gmail.com>
@stevanbz stevanbz requested a review from a team January 23, 2023 21:33
…d forwarded detector once the workflow is being created

Signed-off-by: Stevan Buzejic <buzejic.stevan@gmail.com>
Signed-off-by: Stevan Buzejic <buzejic.stevan@gmail.com>
…ored tests

Signed-off-by: Stevan Buzejic <buzejic.stevan@gmail.com>
Signed-off-by: Stevan Buzejic <buzejic.stevan@gmail.com>
Signed-off-by: Stevan Buzejic <buzejic.stevan@gmail.com>
…rklfow and then deleting the monitors

Signed-off-by: Stevan Buzejic <buzejic.stevan@gmail.com>
riysaxen-amzn pushed a commit to riysaxen-amzn/security-analytics that referenced this pull request Mar 25, 2024
* Rebase to push doc level changes on latest main changes (#391)

* Document level alerting dev (opensearch-project#272)

Signed-off-by: Ashish Agrawal <ashisagr@amazon.com>

* Add last run context to Monitor data model

Signed-off-by: Ashish Agrawal <ashisagr@amazon.com>

* add Update Monitor function

Signed-off-by: Ashish Agrawal <ashisagr@amazon.com>

* fix integ test

Signed-off-by: Ashish Agrawal <ashisagr@amazon.com>

* Implemented draft of Finding data model, a new Input type, and some basic unit tests. (opensearch-project#260)

* Implemented draft of Finding data model, and some basic unit tests for it.

Signed-off-by: AWSHurneyt <79280347+AWSHurneyt@users.noreply.github.com>

* POC for doc-level-alerting (opensearch-project#277)

Signed-off-by: Sriram <59816283+skkosuri-amzn@users.noreply.github.com>

* Add connection to triggers for doc level alerting (opensearch-project#316)

Signed-off-by: Ashish Agrawal <ashisagr@amazon.com>

* CRUD APIs integration Tests and validation"conflict resolved" (opensearch-project#362)

Signed-off-by: charliezhangaws <zhanncha@amazon.com>

* Segregate monitor runner logic for separation of concerns (opensearch-project#363)

* Refactor monitor runner logic for separation of concerns and better testability.

Signed-off-by: Saurabh Singh <getsaurabh02@gmail.com>

* Add action and alert flow and findings schema and additional fixes (opensearch-project#381)

Signed-off-by: Ashish Agrawal <ashisagr@amazon.com>

* Finding Search API (opensearch-project#385)

* Findings search API based on Annie's work

Signed-off-by: Annie Lee <leeyun@amazon.com>

* Fix Search API and add IT tests

Signed-off-by: Ashish Agrawal <ashisagr@amazon.com>

Co-authored-by: Annie Lee <leeyun@amazon.com>

* Fix integ tests and minor issues from doc level changes

Signed-off-by: Ashish Agrawal <ashisagr@amazon.com>

Co-authored-by: Annie Lee <71157062+leeyun-amzn@users.noreply.github.com>
Co-authored-by: Daniel Doubrovkine (dB.) <dblock@dblock.org>
Co-authored-by: AWSHurneyt <79280347+AWSHurneyt@users.noreply.github.com>
Co-authored-by: Sriram <59816283+skkosuri-amzn@users.noreply.github.com>
Co-authored-by: charliezhangaws <zhanncha@amazon.com>
Co-authored-by: Saurabh Singh <getsaurabh02@gmail.com>
Co-authored-by: Annie Lee <leeyun@amazon.com>

* Add Trigger condition resolver which parses and evaluates the Trigger expression. (opensearch-project#405)

Signed-off-by: Saurabh Singh <sisurab@amazon.com>

* percolate query implementation in doc-level alerting (opensearch-project#399)

Signed-off-by: Subhobrata Dey <sbcd90@gmail.com>

* Finding Index rollover (opensearch-project#408)

* Finding Index rollover

Signed-off-by: jiahe zhang <zhanncha@amazon.com>

* Apply fixes to make rollover work

Signed-off-by: Ashish Agrawal <ashisagr@amazon.com>

Co-authored-by: jiahe zhang <zhanncha@amazon.com>

Co-authored-by: Annie Lee <71157062+leeyun-amzn@users.noreply.github.com>
Co-authored-by: Daniel Doubrovkine (dB.) <dblock@dblock.org>
Co-authored-by: AWSHurneyt <79280347+AWSHurneyt@users.noreply.github.com>
Co-authored-by: Sriram <59816283+skkosuri-amzn@users.noreply.github.com>
Co-authored-by: charliezhangaws <zhanncha@amazon.com>
Co-authored-by: Saurabh Singh <getsaurabh02@gmail.com>
Co-authored-by: Annie Lee <leeyun@amazon.com>
Co-authored-by: Saurabh Singh <sisurab@amazon.com>
Co-authored-by: Subhobrata Dey <sbcd90@gmail.com>
@praveensameneni
Copy link
Copy Markdown
Member

@eirsep , can you review and update/close

@dblock
Copy link
Copy Markdown
Member

dblock commented Jul 15, 2024

[Catch All Triage - 1, 2, 3, 4]

@eirsep

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.

4 participants