-
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
Include more return values for SearchAnomalyDetectorsTool and SearchMonitorsTool #143
Conversation
Signed-off-by: Tyler Ohlsen <[email protected]>
Signed-off-by: Tyler Ohlsen <[email protected]>
Signed-off-by: Tyler Ohlsen <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #143 +/- ##
============================================
+ Coverage 80.51% 80.73% +0.22%
Complexity 198 198
============================================
Files 13 13
Lines 1016 1028 +12
Branches 134 134
============================================
+ Hits 818 830 +12
Misses 146 146
Partials 52 52 ☔ View full report in Codecov by Sentry. |
@@ -33,7 +33,7 @@ | |||
public class SearchAlertsTool implements Tool { | |||
public static final String TYPE = "SearchAlertsTool"; | |||
private static final String DEFAULT_DESCRIPTION = | |||
"This is a tool that finds alert trigger information. It takes 12 optional argument named sortOrder which defines the order of the results (options are asc or desc, and default is asc), and sortString which defines how to sort the results (default is monitor_name.keyword), and size which defines the size of the request to be returned (default is 20), and startIndex which defines the index to start from (default is 0), and searchString which defines the search string to use for searching a specific alert (default is an empty String), and severityLevel which defines the severity level to filter for (default is ALL), and alertState which defines the alert state to filter for (default is ALL), and monitorId which defines the monitor ID to filter for, and alertIndex which defines the alert index to search from (default is null), and monitorIds which defines the list of monitor IDs to filter for, and workflowIds which defines the list of workflow IDs to filter for(default is null), and alertIds which defines the list of alert IDs to filter for (default is null). The tool returns a list of alerts, and the total number of alerts."; | |||
"This is a tool that finds alert trigger information. It takes 12 optional argument named sortOrder which defines the order of the results (options are asc or desc, and default is asc), and sortString which defines how to sort the results (default is monitor_name.keyword), and size which defines the size of the request to be returned (default is 20), and startIndex which defines the index to start from (default is 0), and searchString which defines the search string to use for searching a specific alert (default is an empty String), and severityLevel which defines the severity level to filter for (default is ALL), and alertState which defines the alert state to filter for (default is ALL), and monitorId which defines the monitor ID to filter for, and alertIndex which defines the alert index to search from (default is null), and monitorIds which defines the list of monitor IDs to filter for, and workflowIds which defines the list of workflow IDs to filter for(default is null), and alertIds which defines the list of alert IDs to filter for (default is null). The tool returns 2 values: a list of alerts (each containining id, version, schema version, monitor ID, workflow ID, workflow name, monitor name, monitor version, monitor user, trigger ID, trigger name, finding IDs, related doc IDs, state, start time, end time, last notifcation time, acknowledged time, error message, error history, severity, action execution results, aggregation result bucket, execution ID, associated alert IDs), and the total number of alerts."; |
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.
Did we see improvement where we defined what the alert object value contained? Do we have any information or metrics that showed doing this helps the tools as I see this is done for AD as well.
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.
Not yet, that will be the next step. The main point here is that many questions are going to involve parsing responses to return fields within detectors/monitors/results/etc. (see example in description). For now, I'm starting out by at least exposing them, and tuning later as needed.
…onitorsTool (#143) Signed-off-by: Tyler Ohlsen <[email protected]> (cherry picked from commit 2028247) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
…onitorsTool (opensearch-project#143) Signed-off-by: Tyler Ohlsen <[email protected]>
…ool and SearchMonitorsTool (#145) * Include more return values for SearchAnomalyDetectorsTool and SearchMonitorsTool (#143) Signed-off-by: Tyler Ohlsen <[email protected]> * 2.x changes Signed-off-by: Tyler Ohlsen <[email protected]> --------- Signed-off-by: Tyler Ohlsen <[email protected]>
…ool and SearchMonitorsTool (opensearch-project#145) * Include more return values for SearchAnomalyDetectorsTool and SearchMonitorsTool (opensearch-project#143) Signed-off-by: Tyler Ohlsen <[email protected]> * 2.x changes Signed-off-by: Tyler Ohlsen <[email protected]> --------- Signed-off-by: Tyler Ohlsen <[email protected]> Signed-off-by: yuye-aws <[email protected]>
Description
This PR includes a handful of improvements to the alerting and AD tools:
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.