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

Implement search monitors tool #1749

Closed

Conversation

ohltyler
Copy link
Member

@ohltyler ohltyler commented Dec 11, 2023

Description

Adds a search monitors tool. Utilizes the added getMonitor() & searchMonitors() fns exposed by the alerting interface in common utils. These were refactored from the alerting plugin -> common utils plugin. See related PRs for details:
opensearch-project/common-utils#566
opensearch-project/alerting#1305

Based on the passed parameters, the tool will execute either the get monitor transport action, or search monitors transport action. The get monitor action is straightforward, and just takes in a monitor ID. The search monitors action takes in DSL to query the system index containing the monitor info. The tool handles the query generation logic to prevent the agent from generating it, which would likely be error prone and need advanced prompt engineering. Various params (all optional) are available to pass to the tool's run() function to generate a query (see here for an example generated query).

The amount of parameters and/or the default values may be changed later on depending on agent performance and accuracy. For example, too much parameter tuning may lead to messy or invalid results.

Additionally, further integration testing will need to be done to validate different alerting-related questions input to the agent that will have this tool associated to it.

Issues Resolved

Closes #1545

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: Tyler Ohlsen <[email protected]>

Add final set of optional params

Signed-off-by: Tyler Ohlsen <[email protected]>
@ohltyler
Copy link
Member Author

Dependent on #1748 merging first - keeping draft until that's done.

@ohltyler
Copy link
Member Author

Closing in favor of opensearch-project/skills#66

@ohltyler ohltyler closed this Dec 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE] Tool development for Search Monitor Tool
1 participant