Query insights
Introduced 2.12
To monitor and analyze the search queries within your OpenSearch cluster, you can obtain query insights. With minimal performance impact, query insights features aim to provide comprehensive insights into search query execution, enabling you to better understand search query characteristics, patterns, and system behavior during query execution stages. Query insights facilitate enhanced detection, diagnosis, and prevention of query performance issues, ultimately improving query processing performance, user experience, and overall system resilience.
Typical use cases for query insights features include the following:
- Identify the slowest or most resource-intensive queries impacting your cluster.
- Debug latency spikes and understand query performance patterns.
- Analyze common slow query structures to find optimization opportunities.
- Monitor live, in-flight queries to diagnose immediate search performance issues.
Query insights features are provided by the Query Insights plugin, which is included by default in the OpenSearch distribution. At a high level, these features comprise the following components:
- Collectors: Gather performance-related data points at various stages of search query execution.
- Processors: Perform lightweight aggregation and processing on data collected by the collectors.
- Exporters: Export the data into different sinks.
Query Insights features and settings
Query Insights provides several ways to monitor and analyze your search queries:
- Top N queries: Identify the most resource-intensive or slowest queries over specific time frames based on various performance metrics.
- Grouping top N queries: Discover patterns and analyze similar slow queries by grouping them based on query source structure.
- Live queries monitoring: Get real-time visibility into search queries currently executing within your cluster to identify and debug queries that are currently long running or resource heavy.
- Query insights dashboards: Visualize and configure top query insights interactively in OpenSearch Dashboards.
- Query metrics: Understand the specific performance metrics per query type.
Query Insights plugin health
For information about monitoring the health of the Query Insights plugin, see Query Insights plugin health.