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

Add Trigger condition parser and resolver for Doc Level Alerts #405

Merged

Conversation

getsaurabh02
Copy link
Member

@getsaurabh02 getsaurabh02 commented Apr 15, 2022

Add Trigger condition parser which parses the provided trigger condition expression in the Reverse Polish Notation and then
resolves the final set of Document Ids which matches the given expression for Document Level Alerts.

Users can configure the Trigger condition using the expression strings as below:

Always True
return true

Always False
return false

Query Expressions

* (query[name=sigma-123] && query[name=sigma-456]) || (!query[id=aert34df] && query[tag=sev2])
* query[tag=sev1]
* (query[name=sigma-123] && query[tag=sev2]) || (!query[tag=sev3] && query[id=dfd457iy] && query[tag=“sev1"])

Operartors supported are:

* (
* )
* &&
* ||
* !

Query Identifiers supported are:

* name ---> query[name=sigma-123]
* tag ---> query[tag=sev2]
* id ---> query[id=aert34df]

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

Issue #, if available:

Description of changes:

CheckList:
[x] 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.

@getsaurabh02 getsaurabh02 requested a review from a team April 15, 2022 15:27
@getsaurabh02 getsaurabh02 force-pushed the doc-level-2.0 branch 5 times, most recently from 609a5b8 to 503dfe4 Compare April 15, 2022 23:35
… expression.

Signed-off-by: Saurabh Singh <sisurab@amazon.com>
@codecov-commenter
Copy link

codecov-commenter commented Apr 16, 2022

Codecov Report

❗ No coverage uploaded for pull request base (doc-level-2.0@5f4d9fd). Click here to learn what that means.
The diff coverage is n/a.

@@               Coverage Diff                @@
##             doc-level-2.0     #405   +/-   ##
================================================
  Coverage                 ?   79.26%           
  Complexity               ?      282           
================================================
  Files                    ?      201           
  Lines                    ?     8301           
  Branches                 ?     1124           
================================================
  Hits                     ?     6580           
  Misses                   ?     1162           
  Partials                 ?      559           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5f4d9fd...c18a9a3. Read the comment docs.

if (triggered) triggeredDocs.add(doc)
} else if (!trigger.condition.idOrCode.equals(NEVER_RUN.idOrCode)) {
triggeredDocs = TriggerExpressionParser(trigger.condition.idOrCode).parse()
.evaluate(queryToDocIds).toMutableList()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the if-else if block moves the object equals check to runtime. Kotlin allows this check to be made at compile time using when control statements.

when (trigger.condition.idOrCode) {
                ALWAYS_RUN.idOrCode  -> {
                    for (value in queryToDocIds.values) {
                        triggeredDocs.addAll(value)
                    }
                }
                NEVER_RUN.idOrCode -> {
                    triggeredDocs = TriggerExpressionParser(trigger.condition.idOrCode).parse()
                        .evaluate(queryToDocIds).toMutableList()
                }
            }

this will allow catching runtime errors we faced today at compile time only.

Copy link
Member Author

@getsaurabh02 getsaurabh02 Apr 16, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the suggestion @sbcd90. Agree, control statement could make the flow look much cleaner and I have used it in the Parser/Evaluation logic. However, here since this is not an instance check, but rather the value check with string comparison, I am not sure having control statement would add any value here in terms of performance. Given string value comparison still need to be performed at runtime.

Since we weren't using all the three possible values here, I chose to keep it as if-else block instead.

* Uses the Shunting-yard algorithm to parse a mathematical expression
* @param triggerExpression String containing the trigger expression for the monitor
*/
class TriggerExpressionParser(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should the class name be changed to TriggerRPNExpressionParser?
parse() returns TriggerExpressionRPNResolver
tomorrow if someone wants to have another implementation of interface ExpressionParser

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since currently there is only one concrete implementation of the Trigger Expression Parser have kept the name as is for clarity. However, the base implementation which holds the RPN logic is named as the TriggerExpressionRPNBaseParser.
Later addition of new base implementations are possible using the new strategy, while the concrete implementation could still expose them via different method interfaces.

@getsaurabh02 getsaurabh02 merged commit 4705396 into opensearch-project:doc-level-2.0 Apr 16, 2022
lezzago added a commit that referenced this pull request Apr 18, 2022
* Rebase to push doc level changes on latest main changes (#391)

* Document level alerting dev (#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. (#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 (#277)

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

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

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

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

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

* Segregate monitor runner logic for separation of concerns (#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 (#381)

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

* Finding Search API (#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. (#405)

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

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

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

* Finding Index rollover (#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>
AWSHurneyt added a commit to AWSHurneyt/OpenSearch-Alerting that referenced this pull request Apr 21, 2022
* Rebase to push doc level changes on latest main changes (opensearch-project#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>
Signed-off-by: AWSHurneyt <hurneyt@amazon.com>
AWSHurneyt added a commit that referenced this pull request Apr 21, 2022
* fix security test workflow (#407)

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

* Integrate Document Level Alerting changes (#410)

* Rebase to push doc level changes on latest main changes (#391)

* Document level alerting dev (#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. (#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 (#277)

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

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

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

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

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

* Segregate monitor runner logic for separation of concerns (#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 (#381)

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

* Finding Search API (#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. (#405)

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

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

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

* Finding Index rollover (#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>
Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* Remove write Destination APIs (#412)

* Remove write Destination API REST handlers

Signed-off-by: Mohammad Qureshi <47198598+qreshi@users.noreply.github.com>

* Remove write Destination transport actions

Signed-off-by: Mohammad Qureshi <47198598+qreshi@users.noreply.github.com>

* Remove write Destination action, request and response classes

Signed-off-by: Mohammad Qureshi <47198598+qreshi@users.noreply.github.com>

* Create Alerting config index if it doesn't exist before legacy Destination indexing

Signed-off-by: Mohammad Qureshi <47198598+qreshi@users.noreply.github.com>

* Remove write Destination related security tests

Signed-off-by: Mohammad Qureshi <47198598+qreshi@users.noreply.github.com>

* Remove unused access roles and imports

Signed-off-by: Mohammad Qureshi <47198598+qreshi@users.noreply.github.com>
Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* Deprecate the Master nomenclature in 2.0 (#415)

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

* Remove Alerting's notification subproject (#413)

* Remove notification subproject

Signed-off-by: Mohammad Qureshi <47198598+qreshi@users.noreply.github.com>

* Remove publishing to maven in build script

Signed-off-by: Mohammad Qureshi <47198598+qreshi@users.noreply.github.com>
Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* Skipping destination migration if alerting index is not initialized (#417)

Signed-off-by: Ravi 6005951+thalurur@users.noreply.github.com
Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* Alias support for Document Level Monitors (#416)

* Implemented support for defining doc level monitors using aliases.

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* Fix integ tests and cleaup alias logic

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

Co-authored-by: AWSHurneyt <hurneyt@amazon.com>
Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* Fixed a flaky test condition. (#375)

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* Replace checked-in ZIP for bwc tests with a dynamic dependency (#411)

* Replace checked-in ZIP with a dynamic dependency

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

* Replace checked-in ZIP with a dynamic dependency

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

* Update integTest gradle scripts to run via remote cluster independently (#418)

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* Removed tests that were duplicated while resolving merge conflicts.

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

Co-authored-by: Subhobrata Dey <sbcd90@gmail.com>
Co-authored-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: 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: Mohammad Qureshi <47198598+qreshi@users.noreply.github.com>
Co-authored-by: Ravi <6005951+thalurur@users.noreply.github.com>
Angie-Zhang pushed a commit to Angie-Zhang/alerting that referenced this pull request Jun 29, 2022
* fix security test workflow (opensearch-project#407)

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

* Integrate Document Level Alerting changes (opensearch-project#410)

* Rebase to push doc level changes on latest main changes (opensearch-project#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>
Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* Remove write Destination APIs (opensearch-project#412)

* Remove write Destination API REST handlers

Signed-off-by: Mohammad Qureshi <47198598+qreshi@users.noreply.github.com>

* Remove write Destination transport actions

Signed-off-by: Mohammad Qureshi <47198598+qreshi@users.noreply.github.com>

* Remove write Destination action, request and response classes

Signed-off-by: Mohammad Qureshi <47198598+qreshi@users.noreply.github.com>

* Create Alerting config index if it doesn't exist before legacy Destination indexing

Signed-off-by: Mohammad Qureshi <47198598+qreshi@users.noreply.github.com>

* Remove write Destination related security tests

Signed-off-by: Mohammad Qureshi <47198598+qreshi@users.noreply.github.com>

* Remove unused access roles and imports

Signed-off-by: Mohammad Qureshi <47198598+qreshi@users.noreply.github.com>
Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* Deprecate the Master nomenclature in 2.0 (opensearch-project#415)

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

* Remove Alerting's notification subproject (opensearch-project#413)

* Remove notification subproject

Signed-off-by: Mohammad Qureshi <47198598+qreshi@users.noreply.github.com>

* Remove publishing to maven in build script

Signed-off-by: Mohammad Qureshi <47198598+qreshi@users.noreply.github.com>
Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* Skipping destination migration if alerting index is not initialized (opensearch-project#417)

Signed-off-by: Ravi 6005951+thalurur@users.noreply.github.com
Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* Alias support for Document Level Monitors (opensearch-project#416)

* Implemented support for defining doc level monitors using aliases.

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* Fix integ tests and cleaup alias logic

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

Co-authored-by: AWSHurneyt <hurneyt@amazon.com>
Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* Fixed a flaky test condition. (opensearch-project#375)

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* Replace checked-in ZIP for bwc tests with a dynamic dependency (opensearch-project#411)

* Replace checked-in ZIP with a dynamic dependency

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

* Replace checked-in ZIP with a dynamic dependency

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

* Update integTest gradle scripts to run via remote cluster independently (opensearch-project#418)

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* Removed tests that were duplicated while resolving merge conflicts.

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

Co-authored-by: Subhobrata Dey <sbcd90@gmail.com>
Co-authored-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: 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: Mohammad Qureshi <47198598+qreshi@users.noreply.github.com>
Co-authored-by: Ravi <6005951+thalurur@users.noreply.github.com>
Signed-off-by: Angie Zhang <langelzh@amazon.com>
Angie-Zhang pushed a commit to Angie-Zhang/alerting that referenced this pull request Jun 29, 2022
* Rebase to push doc level changes on latest main changes (opensearch-project#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>
Signed-off-by: Angie Zhang <langelzh@amazon.com>
Angie-Zhang pushed a commit to Angie-Zhang/alerting that referenced this pull request Jun 29, 2022
* fix security test workflow (opensearch-project#407)

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

* Integrate Document Level Alerting changes (opensearch-project#410)

* Rebase to push doc level changes on latest main changes (opensearch-project#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>
Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* Remove write Destination APIs (opensearch-project#412)

* Remove write Destination API REST handlers

Signed-off-by: Mohammad Qureshi <47198598+qreshi@users.noreply.github.com>

* Remove write Destination transport actions

Signed-off-by: Mohammad Qureshi <47198598+qreshi@users.noreply.github.com>

* Remove write Destination action, request and response classes

Signed-off-by: Mohammad Qureshi <47198598+qreshi@users.noreply.github.com>

* Create Alerting config index if it doesn't exist before legacy Destination indexing

Signed-off-by: Mohammad Qureshi <47198598+qreshi@users.noreply.github.com>

* Remove write Destination related security tests

Signed-off-by: Mohammad Qureshi <47198598+qreshi@users.noreply.github.com>

* Remove unused access roles and imports

Signed-off-by: Mohammad Qureshi <47198598+qreshi@users.noreply.github.com>
Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* Deprecate the Master nomenclature in 2.0 (opensearch-project#415)

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

* Remove Alerting's notification subproject (opensearch-project#413)

* Remove notification subproject

Signed-off-by: Mohammad Qureshi <47198598+qreshi@users.noreply.github.com>

* Remove publishing to maven in build script

Signed-off-by: Mohammad Qureshi <47198598+qreshi@users.noreply.github.com>
Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* Skipping destination migration if alerting index is not initialized (opensearch-project#417)

Signed-off-by: Ravi 6005951+thalurur@users.noreply.github.com
Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* Alias support for Document Level Monitors (opensearch-project#416)

* Implemented support for defining doc level monitors using aliases.

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* Fix integ tests and cleaup alias logic

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

Co-authored-by: AWSHurneyt <hurneyt@amazon.com>
Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* Fixed a flaky test condition. (opensearch-project#375)

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* Replace checked-in ZIP for bwc tests with a dynamic dependency (opensearch-project#411)

* Replace checked-in ZIP with a dynamic dependency

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

* Replace checked-in ZIP with a dynamic dependency

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

* Update integTest gradle scripts to run via remote cluster independently (opensearch-project#418)

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* Removed tests that were duplicated while resolving merge conflicts.

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

Co-authored-by: Subhobrata Dey <sbcd90@gmail.com>
Co-authored-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: 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: Mohammad Qureshi <47198598+qreshi@users.noreply.github.com>
Co-authored-by: Ravi <6005951+thalurur@users.noreply.github.com>
Signed-off-by: Angie Zhang <langelzh@amazon.com>
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