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

Support log pattern if there is dsl and index passed for alert summary. #339

Merged
merged 2 commits into from
Sep 30, 2024

Conversation

qianheng-aws
Copy link
Contributor

Description

Support log pattern feature. It will use agent os_summary_with_logPattern if there is parameter dsl and index passed.

Other minor change includes:

  1. reset osInsightAgentId
  2. get output directly due to flow framework script change.

Issues Resolved

Check List

  • New functionality includes testing.
    • All tests pass, including unit test, integration test.
  • New functionality has user manual doc 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: Heng Qian <qianheng@amazon.com>
Signed-off-by: Heng Qian <qianheng@amazon.com>
let result = response.body.inference_results[0].output[0].result;
result = JSON.parse(result).output.text;
return res.ok({ body: result });
return res.ok({ body: response.body.inference_results[0].output[0].result });
Copy link
Member

@ruanyl ruanyl Sep 30, 2024

Choose a reason for hiding this comment

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

So both agents(tools): LOG_PATTERN_SUMMARY_AGENT_CONFIG_ID and SUMMARY_AGENT_CONFIG_ID has changed the output from plain text to json?
Never mind, it seems the output structure changed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah. Only os_insight agent has change its output structure from json to text. Because there is a post function added in connector:

"post_process_function": "return params.output.text;"

@xluo-aws xluo-aws merged commit 5c32cca into opensearch-project:main Sep 30, 2024
9 checks passed
@xluo-aws xluo-aws added the backport 2.x Trigger the backport flow to 2.x label Sep 30, 2024
opensearch-trigger-bot bot pushed a commit that referenced this pull request Sep 30, 2024
…y. (#339)

* Support log pattern if there is dsl and index passed for alert summary.

Signed-off-by: Heng Qian <qianheng@amazon.com>

* Add CHANGELOG.md

Signed-off-by: Heng Qian <qianheng@amazon.com>

---------

Signed-off-by: Heng Qian <qianheng@amazon.com>
(cherry picked from commit 5c32cca)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

# Conflicts:
#	CHANGELOG.md
xluo-aws pushed a commit that referenced this pull request Sep 30, 2024
…y. (#339) (#340)

* Support log pattern if there is dsl and index passed for alert summary.

Signed-off-by: Heng Qian <qianheng@amazon.com>

* Add CHANGELOG.md

Signed-off-by: Heng Qian <qianheng@amazon.com>

---------

Signed-off-by: Heng Qian <qianheng@amazon.com>
(cherry picked from commit 5c32cca)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

# Conflicts:
#	CHANGELOG.md

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x Trigger the backport flow to 2.x
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants