Run a raw Indexer query
wazuh_indexer_queryExecute raw OpenSearch query DSL on Wazuh indices for custom aggregations, scripted fields, and composite queries that standard alert tools cannot express. Limited to read-only searches on wazuh-* indices.
Instructions
Escape hatch: send a raw OpenSearch query DSL body to a Wazuh index for anything the purpose-built alert tools cannot express — unusual aggregations, scripted fields, composite queries. Restricted to wazuh-* indices and read-only _search.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | Yes | OpenSearch query DSL body, e.g. {"query": {"match_all": {}}, "size": 5, "aggs": {...}}. Always set an explicit small 'size' unless you only need aggregations. | |
| index | No | Index pattern to search. Defaults to the configured alerts index. Must start with a wazuh-* prefix. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||