find_slow_queries
Find slow queries by cross-referencing average query latency, running search tasks, thread-pool queues, and search slowlog thresholds. Control top results with top_n.
Instructions
Find what is slow. Combines: indices ranked by average query latency (_stats), currently running search tasks with elapsed time (_tasks), search thread-pool queue/rejection counts per node, and the configured search slowlog thresholds per index (so you know whether slowlog is even on). Use top_n to control how many indices come back.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| index | No | * | |
| top_n | No | ||
| min_avg_ms | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |