You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 9204af9
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: docs/user/ppl/admin/settings.md
+35-1Lines changed: 35 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -493,4 +493,38 @@ Expected output:
493
493
"transient": {}
494
494
}
495
495
```
496
-
496
+
497
+
498
+
## search.insights.top_queries.ppl.enabled
499
+
500
+
### Version
501
+
502
+
3.11
503
+
504
+
### Description
505
+
506
+
This setting controls whether completed PPL queries are recorded into Query Insights Top N. When enabled, the PPL plugin reports each PPL query it runs through `_plugins/_ppl` to the Query Insights plugin when the query finishes: its query text, latency, CPU, memory, whether it failed, and, on a security-enabled cluster, the requesting user. It also tags the DSL searches the query runs, so Query Insights lists them as the query's sub-queries.
507
+
508
+
These are not recorded: `explain` (on the `_explain` endpoint or in the query text), `analyze`, asynchronous submissions, queries routed to the analytics engine, queries that fail to parse, and a PPL query that starts inside another one, whose searches belong to the outer query.
509
+
510
+
1. The default value is false (opt-in).
511
+
2. This setting is node scope, matching the rest of the `search.insights.top_queries.*` family.
512
+
3. It is dynamic: update it through the cluster settings API, as in the example below.
513
+
514
+
Note on query text and user identity: the record stores the query as it was submitted, including any literal values in it, the same way Query Insights stores the source of a DSL search. When a security plugin is installed, the record also includes the requesting user (username, roles, backend roles). Who can see these in Top N results is governed by the Query Insights plugin's own RBAC filter, `search.insights.top_queries.filter_by_mode` — default `none` (no per-user filtering), `username` (a user sees only their own queries; admins see all), or `backend_roles`. Set it to `username` or `backend_roles` if other users' queries and identities should not be visible to every Top N reader.
515
+
516
+
Note on CPU and memory: the PPL plugin reports the CPU time and the bytes allocated by the query's own engine threads, the same values `_tasks` shows for the PPL task. Query Insights adds the CPU and memory of the searches the query ran, so the figures in Top N cover the whole query. OpenSearch records these only while the cluster setting `task_resource_tracking.enabled` is on (the default). With it off, a PPL record reports 0 CPU and 0 memory.
517
+
518
+
Note: This setting is **registered by the Query Insights plugin** (it belongs to the `search.insights.top_queries.*` family), not by the PPL plugin. The PPL plugin reads its value to decide whether to report. It therefore only takes effect when the Query Insights plugin is installed; when Query Insights is absent the setting is unregistered and PPL reporting is a no-op.
519
+
520
+
### Example
521
+
522
+
With the Query Insights plugin installed, you can enable PPL recording like this:
This example is not executed as part of the documentation tests because the setting is registered by the Query Insights plugin, which is not installed in the PPL documentation test cluster.
0 commit comments