diff --git a/_dashboards/dashboards-assistant/suggest-anomaly-detector.md b/_dashboards/dashboards-assistant/suggest-anomaly-detector.md new file mode 100644 index 0000000000..c1eeb7381c --- /dev/null +++ b/_dashboards/dashboards-assistant/suggest-anomaly-detector.md @@ -0,0 +1,67 @@ +--- +layout: default +title: Suggest Anomaly Detector +parent: OpenSearch Assistant for OpenSearch Dashboards +nav_order: 1 +has_children: false +--- + +# Suggest Anomaly Detector +**Experimental** +{: .label .label-purple } + +The OpenSearch-Dashboards Assistant suggest anomaly detector feature helps you create anomaly detector based on the suggestion given by LLM. + +## Configuration + +### Prerequisites +1. Please note that you only need to setup `os_suggest_ad` agent for suggest anomaly detector feature, follow this [guide](http://localhost:4000/docs/latest/dashboards/dashboards-assistant/index/#configuring-opensearch-assistant) to setup `os_suggest_ad` agent. +2. Ensure query enhancements feature is enabled, you can goto `Dashboards Management`>`Advanced settings` to enable this feature. + +### Enable Suggest Anomaly Detector +```yaml +assistant.smartAnomalyDetector.enabled: true +``` +{% include copy.html %} + +### Create agents with OpenSearch flow-framework +Use OpenSearch flow-framework to create the required agents. Please follow [flow-framework documentation](https://github.com/opensearch-project/flow-framework) to create the agents. +You can start with the flow-framework example template for suggest anomaly detector, see the example template [here](https://github.com/opensearch-project/flow-framework/tree/main/sample-templates). + +### Configure agents +Configure agent for suggest anomaly detector +``` +POST /.plugins-ml-config/_doc/os_suggest_ad +{ + "type": "suggest_anomaly_detector_agent", + "configuration": { + "agent_id": "your agent id of suggest anomaly detector" + } +} +``` +{% include copy-curl.html %} + +### Verify +You can verify if the agents were create successfully by call the agents with example payload +``` +POST /_plugins/_ml/agents//_execute +{ + "parameters": { + "index":"sample_weblogs_test" + } +} +``` +{% include copy-curl.html %} + +## Suggest Anomaly Detector UI + +Select an index pattern, click the `AI assistant` button and then click the `Suggest anomaly detector` action: + +Click the Suggest anomaly detector action + +Wait LLM to give the suggested model features and category field for creating anomaly detector for the index pattern, then click the `Create detector` button to create an anomaly detector. + +Suggested anomaly detector + + + diff --git a/images/dashboards-assistant/suggestAD-UI.png b/images/dashboards-assistant/suggestAD-UI.png new file mode 100644 index 0000000000..dd7e32d6e2 Binary files /dev/null and b/images/dashboards-assistant/suggestAD-UI.png differ diff --git a/images/dashboards-assistant/suggestAD-button.png b/images/dashboards-assistant/suggestAD-button.png new file mode 100644 index 0000000000..efac2ef7c8 Binary files /dev/null and b/images/dashboards-assistant/suggestAD-button.png differ