From caf8d1ff167d0c31b8812fecfefb094ccdc9788c Mon Sep 17 00:00:00 2001 From: Fanit Kolchina Date: Wed, 12 Jul 2023 16:51:06 -0400 Subject: [PATCH 1/4] Add search pipeline metrics to Nodes Stats API Signed-off-by: Fanit Kolchina --- _api-reference/nodes-apis/nodes-stats.md | 94 ++++++++++++++++++++++++ 1 file changed, 94 insertions(+) diff --git a/_api-reference/nodes-apis/nodes-stats.md b/_api-reference/nodes-apis/nodes-stats.md index eefd2bf555..99c56c0e39 100644 --- a/_api-reference/nodes-apis/nodes-stats.md +++ b/_api-reference/nodes-apis/nodes-stats.md @@ -106,6 +106,12 @@ GET _nodes/stats/ #### Example response +
+ + Response + + {: .text-delta} + ```json { "_nodes" : { @@ -509,6 +515,64 @@ GET _nodes/stats/ }, "pipelines" : { } }, + "search_pipeline" : { + "total_request" : { + "count" : 5, + "time_in_millis" : 158, + "current" : 0, + "failed" : 0 + }, + "total_response" : { + "count" : 2, + "time_in_millis" : 1, + "current" : 0, + "failed" : 0 + }, + "pipelines" : { + "public_info" : { + "request" : { + "count" : 3, + "time_in_millis" : 71, + "current" : 0, + "failed" : 0 + }, + "response" : { + "count" : 0, + "time_in_millis" : 0, + "current" : 0, + "failed" : 0 + }, + "request_processors" : [ + { + "filter_query:abc" : { + "type" : "filter_query", + "stats" : { + "count" : 1, + "time_in_millis" : 0, + "current" : 0, + "failed" : 0 + } + } + }, + ] + ... + "response_processors" : [ + { + "rename_field" : { + "type" : "rename_field", + "stats" : { + "count" : 2, + "time_in_millis" : 1, + "current" : 0, + "failed" : 0 + } + } + } + ] + }, + ... + } + }, "adaptive_selection" : { "F-ByTQzVQ3GQeYzQJArJGQ" : { "outgoing_searches" : 0, @@ -576,6 +640,7 @@ GET _nodes/stats/ } } ``` +
## Response fields @@ -618,6 +683,7 @@ http.total_opened | Integer | The total number of HTTP connections the node has [script_cache](#script-and-script_cache)| Object | Script cache statistics for the node. [discovery](#discovery) | Object | Node discovery statistics for the node. [ingest](#ingest) | Object | Ingest statistics for the node. +[search_pipeline](#search_pipeline) | Object | Statistics related to [search pipelines]({{site.url}}{{site.baseurl}}/search-plugins/search-pipelines/index/). [adaptive_selection](#adaptive_selection) | Object | Statistics about adaptive selections for the node. [indexing_pressure](#indexing_pressure) | Object | Statistics related to the node's indexing pressure. [shard_indexing_pressure](#shard_indexing_pressure) | Object | Statistics related to indexing pressure at the shard level. @@ -936,6 +1002,34 @@ pipelines._id_.time_in_millis | Integer | The total amount of time for preproces pipelines._id_.failed | Integer | The total number of failed ingestions for the ingest pipeline. pipelines._id_.processors | Array of objects | Statistics for the ingest processors. Includes the number of documents that are currently transformed, the total number of transformed documents, the number of failed transformations, and the time spent transforming documents. +### `search_pipeline` + +The `search_pipeline` object contains the statistics related to [search pipelines]({{site.url}}{{site.baseurl}}/search-plugins/search-pipelines/index/) and has the following properties. + +Field | Field type | Description +:--- | :--- | :--- +total_request | Object | Cumulative statistics related to all search request processors. +total_request.count | Integer | The total number of search request processor executions. +total_request.time_in_millis | Integer | The total amount of time for all search request processor executions, in milliseconds. +total_request.current | Integer | The total number of search request processor executions currently in progress. +total_request.failed | Integer | The total number of failed search request processor executions. +total_response | Object | Cumulative statistics related to all search response processors. +total_response.count | Integer | The total number of search response processor executions. +total_response.time_in_millis | Integer | The total amount of time for all search response processor executions, in milliseconds. +total_response.current | Integer | The total number of search response processor executions currently in progress. +total_response.failed | Integer | The total number of failed search response processor executions. +pipelines | Object | Search pipeline statistics. Each pipeline is a nested object specified by its ID with the properties listed in the following rows. +pipelines._id_.request.count | Integer | The number of search request processor executions by the search pipeline. +pipelines._id_.request.time_in_millis | Integer | The total amount of time for search request processor executions in the search pipeline, in milliseconds. +pipelines._id_.request.current | Integer | The number of search request processor executions currently in progress for the search pipeline. +pipelines._id_.request.failed | Integer | The number of failed search request processor executions for the search pipeline. +pipelines._id_.request_processors | Array of objects | Statistics for the search request processors. Includes the total number of executions, the total amount of time of executions, the total number of executions currently in progress, and the number of failed executions. +pipelines._id_.response.count | Integer | The number of search response processor executions by the search pipeline. +pipelines._id_.response.time_in_millis | Integer | The total amount of time for search response processor executions in the search pipeline, in milliseconds. +pipelines._id_.response.current | Integer | The number of search response processor executions currently in progress for the search pipeline. +pipelines._id_.response.failed | Integer | The number of failed search response processor executions for the search pipeline. +pipelines._id_.response_processors | Array of objects | Statistics for the search response processors. Includes the total number of executions, the total amount of time of executions, the total number of executions currently in progress, and the number of failed executions. + ### `adaptive_selection` The `adaptive_selection` object contains the adaptive selection statistics. Each entry is specified by the node ID and has the properties listed below. From ecc4fda221a619c0896c3c99c52ef0fc17fd729d Mon Sep 17 00:00:00 2001 From: Fanit Kolchina Date: Thu, 13 Jul 2023 11:52:00 -0400 Subject: [PATCH 2/4] Add note about tags Signed-off-by: Fanit Kolchina --- _api-reference/nodes-apis/nodes-stats.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_api-reference/nodes-apis/nodes-stats.md b/_api-reference/nodes-apis/nodes-stats.md index 99c56c0e39..831a5757d0 100644 --- a/_api-reference/nodes-apis/nodes-stats.md +++ b/_api-reference/nodes-apis/nodes-stats.md @@ -1018,7 +1018,7 @@ total_response.count | Integer | The total number of search response processor e total_response.time_in_millis | Integer | The total amount of time for all search response processor executions, in milliseconds. total_response.current | Integer | The total number of search response processor executions currently in progress. total_response.failed | Integer | The total number of failed search response processor executions. -pipelines | Object | Search pipeline statistics. Each pipeline is a nested object specified by its ID with the properties listed in the following rows. +pipelines | Object | Search pipeline statistics. Each pipeline is a nested object specified by its ID with the properties listed in the following rows. If a processor has a `tag`, statistics for the processor are provided in the object with the name `:` (for example, `filter_query:abc`). Statistics for all processors of the same type that do not have a `tag` are aggregated and provided in the object with the name `` (for example, `filter_query`). pipelines._id_.request.count | Integer | The number of search request processor executions by the search pipeline. pipelines._id_.request.time_in_millis | Integer | The total amount of time for search request processor executions in the search pipeline, in milliseconds. pipelines._id_.request.current | Integer | The number of search request processor executions currently in progress for the search pipeline. From 4049711677c7b1b1830b61a0c44aebccde5a76fd Mon Sep 17 00:00:00 2001 From: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> Date: Thu, 13 Jul 2023 14:06:19 -0400 Subject: [PATCH 3/4] Apply suggestions from code review Co-authored-by: Nathan Bower Signed-off-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> --- _api-reference/nodes-apis/nodes-stats.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/_api-reference/nodes-apis/nodes-stats.md b/_api-reference/nodes-apis/nodes-stats.md index 831a5757d0..169b39718e 100644 --- a/_api-reference/nodes-apis/nodes-stats.md +++ b/_api-reference/nodes-apis/nodes-stats.md @@ -1018,13 +1018,13 @@ total_response.count | Integer | The total number of search response processor e total_response.time_in_millis | Integer | The total amount of time for all search response processor executions, in milliseconds. total_response.current | Integer | The total number of search response processor executions currently in progress. total_response.failed | Integer | The total number of failed search response processor executions. -pipelines | Object | Search pipeline statistics. Each pipeline is a nested object specified by its ID with the properties listed in the following rows. If a processor has a `tag`, statistics for the processor are provided in the object with the name `:` (for example, `filter_query:abc`). Statistics for all processors of the same type that do not have a `tag` are aggregated and provided in the object with the name `` (for example, `filter_query`). -pipelines._id_.request.count | Integer | The number of search request processor executions by the search pipeline. +pipelines | Object | Search pipeline statistics. Each pipeline is a nested object specified by its ID, with the properties listed in the following rows. If a processor has a `tag`, statistics for the processor are provided in the object with the name `:` (for example, `filter_query:abc`). Statistics for all processors of the same type that do not have a `tag` are aggregated and provided in the object with the name `` (for example, `filter_query`). +pipelines._id_.request.count | Integer | The number of search request processor executions performed by the search pipeline. pipelines._id_.request.time_in_millis | Integer | The total amount of time for search request processor executions in the search pipeline, in milliseconds. pipelines._id_.request.current | Integer | The number of search request processor executions currently in progress for the search pipeline. pipelines._id_.request.failed | Integer | The number of failed search request processor executions for the search pipeline. pipelines._id_.request_processors | Array of objects | Statistics for the search request processors. Includes the total number of executions, the total amount of time of executions, the total number of executions currently in progress, and the number of failed executions. -pipelines._id_.response.count | Integer | The number of search response processor executions by the search pipeline. +pipelines._id_.response.count | Integer | The number of search response processor executions performed by the search pipeline. pipelines._id_.response.time_in_millis | Integer | The total amount of time for search response processor executions in the search pipeline, in milliseconds. pipelines._id_.response.current | Integer | The number of search response processor executions currently in progress for the search pipeline. pipelines._id_.response.failed | Integer | The number of failed search response processor executions for the search pipeline. From 0548eec9790a83ef95110da81da00e0c2e37d1b6 Mon Sep 17 00:00:00 2001 From: Fanit Kolchina Date: Thu, 13 Jul 2023 14:40:04 -0400 Subject: [PATCH 4/4] Add a sentence about expanding the response Signed-off-by: Fanit Kolchina --- _api-reference/nodes-apis/nodes-stats.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/_api-reference/nodes-apis/nodes-stats.md b/_api-reference/nodes-apis/nodes-stats.md index 831a5757d0..89f3ceeb3e 100644 --- a/_api-reference/nodes-apis/nodes-stats.md +++ b/_api-reference/nodes-apis/nodes-stats.md @@ -106,6 +106,8 @@ GET _nodes/stats/ #### Example response +Select the arrow to view the example response. +
Response