Skip to content

Commit 01e3069

Browse files
dzane17kolchfa-awsnatebower
authored
Update GET top N api documentation (#8139)
* Update GET top N api documentation Signed-off-by: David Zane <[email protected]> * Update _observing-your-data/query-insights/top-n-queries.md Co-authored-by: kolchfa-aws <[email protected]> Signed-off-by: David Zane <[email protected]> * Apply suggestions from code review Co-authored-by: Nathan Bower <[email protected]> Signed-off-by: kolchfa-aws <[email protected]> --------- Signed-off-by: David Zane <[email protected]> Signed-off-by: David Zane <[email protected]> Signed-off-by: kolchfa-aws <[email protected]> Co-authored-by: kolchfa-aws <[email protected]> Co-authored-by: Nathan Bower <[email protected]>
1 parent f44deb2 commit 01e3069

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

_observing-your-data/query-insights/top-n-queries.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ nav_order: 10
77

88
# Top N queries
99

10-
Monitoring the top N queries in query insights features can help you gain real-time insights into the top queries with high latency within a certain time frame (for example, the last hour).
10+
Monitoring the top N queries using query insights allows you to gain real-time visibility into the queries with the highest latency or resource consumption in a specified time period (for example, the last hour).
1111

1212
## Configuring top N query monitoring
1313

@@ -72,14 +72,14 @@ PUT _cluster/settings
7272

7373
## Monitoring the top N queries
7474

75-
You can use the Insights API endpoint to obtain the top N queries for all metric types:
75+
You can use the Insights API endpoint to retrieve the top N queries. This API returns top N `latency` results by default.
7676

7777
```json
7878
GET /_insights/top_queries
7979
```
8080
{% include copy-curl.html %}
8181

82-
Specify a metric type to filter the response:
82+
Specify the `type` parameter to retrieve the top N results for other metric types. The results will be sorted in descending order based on the specified metric type.
8383

8484
```json
8585
GET /_insights/top_queries?type=latency
@@ -96,6 +96,9 @@ GET /_insights/top_queries?type=memory
9696
```
9797
{% include copy-curl.html %}
9898

99+
If your query returns no results, ensure that top N query monitoring is enabled for the target metric type and that search requests were made within the current [time window](#configuring-the-window-size).
100+
{: .important}
101+
99102
## Exporting top N query data
100103

101104
You can configure your desired exporter to export top N query data to different sinks, allowing for better monitoring and analysis of your OpenSearch queries. Currently, the following exporters are supported:

0 commit comments

Comments
 (0)