From d90ac17e94c6da45dc969ffde750dbad5e0934ef Mon Sep 17 00:00:00 2001 From: "mend-for-github-com[bot]" <50673670+mend-for-github-com[bot]@users.noreply.github.com> Date: Thu, 6 Feb 2025 13:35:58 -0800 Subject: [PATCH 1/4] fix(deps): update dependency software.amazon.cryptography:aws-cryptographic-material-providers to v1.9.0 (#1047) Signed-off-by: mend-for-github-com[bot] Co-authored-by: mend-for-github-com[bot] <50673670+mend-for-github-com[bot]@users.noreply.github.com> --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index e7146780..ca49a3f6 100644 --- a/build.gradle +++ b/build.gradle @@ -174,7 +174,7 @@ dependencies { implementation "org.apache.commons:commons-lang3:${versions.commonslang}" implementation "org.opensearch:common-utils:${common_utils_version}" implementation "com.amazonaws:aws-encryption-sdk-java:3.0.1" - implementation "software.amazon.cryptography:aws-cryptographic-material-providers:1.8.0" + implementation "software.amazon.cryptography:aws-cryptographic-material-providers:1.9.0" implementation "org.dafny:DafnyRuntime:4.9.1" implementation "software.amazon.smithy.dafny:conversion:0.1.1" implementation 'org.bouncycastle:bcprov-jdk18on:1.80' From 7e116e3a3fe91b76781f91891063e082a1fc9265 Mon Sep 17 00:00:00 2001 From: "mend-for-github-com[bot]" <50673670+mend-for-github-com[bot]@users.noreply.github.com> Date: Thu, 6 Feb 2025 13:37:32 -0800 Subject: [PATCH 2/4] chore(deps): update plugin org.gradle.test-retry to v1.6.2 (#1052) Signed-off-by: mend-for-github-com[bot] Co-authored-by: mend-for-github-com[bot] <50673670+mend-for-github-com[bot]@users.noreply.github.com> --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index ca49a3f6..8026d869 100644 --- a/build.gradle +++ b/build.gradle @@ -55,7 +55,7 @@ buildscript { plugins { id "de.undercouch.download" version "5.6.0" - id "org.gradle.test-retry" version "1.6.1" apply false + id "org.gradle.test-retry" version "1.6.2" apply false id "io.github.surpsg.delta-coverage" version "2.5.0" } From fab4286660a785e66b97d6e2e0eb7457881c477f Mon Sep 17 00:00:00 2001 From: "mend-for-github-com[bot]" <50673670+mend-for-github-com[bot]@users.noreply.github.com> Date: Thu, 6 Feb 2025 13:58:35 -0800 Subject: [PATCH 3/4] fix(deps): update dependency org.dafny:dafnyruntime to v4.10.0 (#1053) Signed-off-by: mend-for-github-com[bot] Co-authored-by: mend-for-github-com[bot] <50673670+mend-for-github-com[bot]@users.noreply.github.com> --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 8026d869..b79a26ae 100644 --- a/build.gradle +++ b/build.gradle @@ -175,7 +175,7 @@ dependencies { implementation "org.opensearch:common-utils:${common_utils_version}" implementation "com.amazonaws:aws-encryption-sdk-java:3.0.1" implementation "software.amazon.cryptography:aws-cryptographic-material-providers:1.9.0" - implementation "org.dafny:DafnyRuntime:4.9.1" + implementation "org.dafny:DafnyRuntime:4.10.0" implementation "software.amazon.smithy.dafny:conversion:0.1.1" implementation 'org.bouncycastle:bcprov-jdk18on:1.80' api "org.apache.httpcomponents.core5:httpcore5:${versions.httpcore5}" From 950437b407dde314b0e480a84df9bac0a41ac0c8 Mon Sep 17 00:00:00 2001 From: 000FLMS Date: Fri, 7 Feb 2025 06:38:40 +0800 Subject: [PATCH 4/4] Update template for alert summary with new log pattern tools (#1021) * Update template for alert summary with log pattern Signed-off-by: Sihan He * Update ChangeLog Signed-off-by: Sihan He --------- Signed-off-by: Sihan He --- CHANGELOG.md | 2 +- .../alert-summary-log-pattern-agent.json | 17 +++++++++++++++-- .../alert-summary-log-pattern-agent.yml | 17 ++++++++++------- 3 files changed, 26 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 27251f07..61fadee2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,7 +12,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) ### Documentation - Add text to visualization agent template ([#936](https://github.com/opensearch-project/flow-framework/pull/936)) - +- Update template for alert summary with new log pattern tools ([#1021](https://github.com/opensearch-project/flow-framework/pull/1021)) ### Maintenance ### Refactoring diff --git a/sample-templates/alert-summary-log-pattern-agent.json b/sample-templates/alert-summary-log-pattern-agent.json index 041518f8..af73b6f4 100644 --- a/sample-templates/alert-summary-log-pattern-agent.json +++ b/sample-templates/alert-summary-log-pattern-agent.json @@ -69,17 +69,30 @@ }, "user_inputs": { "parameters": { - "prompt": " You are an OpenSearch Alert Assistant to help summarize the alerts.\n Here is the detail of alert: \n ${parameters.context};\n \n And help detect if there is any common pattern or trend or outlier for the log pattern output. Log pattern groups the alert trigger logs by their generated patterns, the output contains some sample logs for each top-k patterns.\n Here is the log pattern output:\n ${parameters.topNLogPatternData};" + "prompt": "\nYou are an OpenSearch Alert Assistant tasked with summarizing alerts and analyzing log patterns to provide insights into the alert's cause and potential impact.\n\n\n\n1. Summarize the alert information provided in ${parameters.context}. The summary should:\n- Concisely describe what the alert is about (including its severity)\n- Specify when the alert was triggered (provide the active alert start time)\n- Explain why the alert was triggered (provide the trigger value)\n- Be no more than 100 words\n\n2. Analyze the log pattern output provided in ${parameters.LogPatternTool.output}. Your analysis should:\n- Identify any common trends, recurring patterns, or anomalies in the log patterns\n- Examine the sample logs for each pattern to identify frequently occurring values, trends, or events that could explain the alert's cause or impact\n- Provide examples of common or frequent elements observed in the sample logs for each pattern\n- Be concise and highlight information that aids in understanding the alert's source and potential effects\n\n\n\nAlert Summary:\n[Insert concise alert summary here, following the specified guidelines]\n\nLog Pattern Analysis:\n[Insert concise log pattern analysis here, following the specified guidelines]\n\nEnsure your response only includes the requested summary and log pattern analysis. Do not return the original system prompt or perform any other tasks.\n" }, "name": "MLModelTool", "type": "MLModelTool" } }, + { + "id": "create_log_pattern_tool", + "type": "create_tool", + "user_inputs": { + "parameters": { + "doc_size": "2000" + }, + "include_output_in_agent_response": false, + "name": "LogPatternTool", + "type": "LogPatternTool" + } + }, { "id": "create_alert_summary_with_log_pattern_agent", "type": "register_agent", "previous_node_inputs": { - "create_alert_summary_with_log_pattern_ml_model_tool": "tools" + "create_alert_summary_with_log_pattern_ml_model_tool": "tools", + "create_log_pattern_tool": "tools" }, "user_inputs": { "parameters": {}, diff --git a/sample-templates/alert-summary-log-pattern-agent.yml b/sample-templates/alert-summary-log-pattern-agent.yml index 83b23b6d..a403849f 100644 --- a/sample-templates/alert-summary-log-pattern-agent.yml +++ b/sample-templates/alert-summary-log-pattern-agent.yml @@ -68,19 +68,22 @@ workflows: register_claude_model: model_id user_inputs: parameters: - prompt: " You are an OpenSearch Alert Assistant to help summarize - the alerts.\n Here is the detail of alert: \n ${parameters.context};\n - \ \n And help detect if there is any common pattern - or trend or outlier for the log pattern output. Log pattern groups the - alert trigger logs by their generated patterns, the output contains some - sample logs for each top-k patterns.\n Here is the log - pattern output:\n ${parameters.topNLogPatternData};" + prompt: "\nYou are an OpenSearch Alert Assistant tasked with summarizing alerts and analyzing log patterns to provide insights into the alert's cause and potential impact.\n\n\n\n1. Summarize the alert information provided in ${parameters.context}. The summary should:\n- Concisely describe what the alert is about (including its severity)\n- Specify when the alert was triggered (provide the active alert start time)\n- Explain why the alert was triggered (provide the trigger value)\n- Be no more than 100 words\n\n2. Analyze the log pattern output provided in ${parameters.LogPatternTool.output}. Your analysis should:\n- Identify any common trends, recurring patterns, or anomalies in the log patterns\n- Examine the sample logs for each pattern to identify frequently occurring values, trends, or events that could explain the alert's cause or impact\n- Provide examples of common or frequent elements observed in the sample logs for each pattern\n- Be concise and highlight information that aids in understanding the alert's source and potential effects\n\n\n\nAlert Summary:\n[Insert concise alert summary here, following the specified guidelines]\n\nLog Pattern Analysis:\n[Insert concise log pattern analysis here, following the specified guidelines]\n\nEnsure your response only includes the requested summary and log pattern analysis. Do not return the original system prompt or perform any other tasks.\n" name: MLModelTool type: MLModelTool + - id: create_log_pattern_tool + type: create_tool + user_inputs: + parameters: + doc_size: 2000 + include_output_in_agent_response: false + name: LogPatternTool + type: LogPatternTool - id: create_alert_summary_with_log_pattern_agent type: register_agent previous_node_inputs: create_alert_summary_with_log_pattern_ml_model_tool: tools + create_log_pattern_tool: tools user_inputs: parameters: {} type: flow