-
Notifications
You must be signed in to change notification settings - Fork 30
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
Migrate alerting tools #66
Conversation
Signed-off-by: Tyler Ohlsen <ohltyler@amazon.com>
Signed-off-by: Tyler Ohlsen <ohltyler@amazon.com>
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #66 +/- ##
============================================
+ Coverage 81.76% 82.21% +0.44%
- Complexity 63 119 +56
============================================
Files 6 10 +4
Lines 373 686 +313
Branches 46 94 +48
============================================
+ Hits 305 564 +259
- Misses 38 74 +36
- Partials 30 48 +18 ☔ View full report in Codecov by Sentry. |
@@ -12,6 +12,7 @@ buildscript { | |||
opensearch_version = System.getProperty("opensearch.version", "3.0.0-SNAPSHOT") | |||
isSnapshot = "true" == System.getProperty("build.snapshot", "true") | |||
buildVersionQualifier = System.getProperty("build.version_qualifier", "") | |||
kotlin_version = System.getProperty("kotlin.version", "1.8.21") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason not to use 1.9.22?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm using the same as that of common utils which has the AlertingPluginInterface
logic we use here.
src/main/java/org/opensearch/agent/tools/SearchMonitorsTool.java
Outdated
Show resolved
Hide resolved
sb.append("id=").append(monitor.getId()).append(","); | ||
sb.append("name=").append(monitor.getName()); | ||
sb.append("}]"); | ||
sb.append("TotalMonitors=1"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will that be 1
all the time? What if we find 2/3 monitors?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will be 1
all of the time since it is a GetMonitorResponse
: https://opensearch.org/docs/latest/observing-your-data/alerting/api/#get-monitor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comment on line 93/94 above as well.
Signed-off-by: Tyler Ohlsen <ohltyler@amazon.com>
Signed-off-by: Tyler Ohlsen <ohltyler@amazon.com>
Signed-off-by: Tyler Ohlsen <ohltyler@amazon.com>
Signed-off-by: Tyler Ohlsen <ohltyler@amazon.com>
Signed-off-by: Tyler Ohlsen <ohltyler@amazon.com>
|
Signed-off-by: Tyler Ohlsen <ohltyler@amazon.com>
* Add search alerts tool Signed-off-by: Tyler Ohlsen <ohltyler@amazon.com> * Add search monitors tool Signed-off-by: Tyler Ohlsen <ohltyler@amazon.com> * Add param tests and number parsing error handling Signed-off-by: Tyler Ohlsen <ohltyler@amazon.com> * Add for list-based params Signed-off-by: Tyler Ohlsen <ohltyler@amazon.com> * Add error logs Signed-off-by: Tyler Ohlsen <ohltyler@amazon.com> * Fix isNumeric var Signed-off-by: Tyler Ohlsen <ohltyler@amazon.com> * Minor test coverage increase & cleanup Signed-off-by: Tyler Ohlsen <ohltyler@amazon.com> * Cover few edge cases when param parsing Signed-off-by: Tyler Ohlsen <ohltyler@amazon.com> --------- Signed-off-by: Tyler Ohlsen <ohltyler@amazon.com> (cherry picked from commit 2f06f6f) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
(cherry picked from commit 2f06f6f) Signed-off-by: Tyler Ohlsen <ohltyler@amazon.com> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Signed-off-by: yuye-aws <yuyezhu@amazon.com>
Description
Migrates the search alerts and search monitors tools to this repo.
Historical PRs:
opensearch-project/ml-commons#1748
opensearch-project/ml-commons#1749
Check List
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.