From 2df0f8450b6a7e597d2ca5b0c92b84e47389b160 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Vl=C4=8Dek?= Date: Fri, 22 Apr 2022 18:39:12 +0200 Subject: [PATCH 1/5] Introduce Nodes APIs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In this commit we are introducing a new section in REST API Reference for Nodes APIs. We are adding documentation for "Nodes hot threads" and "Nodes info". Because Nodes APIs share common request parameters we also add more detailed section into parent index page (notice that the nodes-filter parameter was moved from "Cluster stats" page and was improved, and relevant links were updated). There are more Nodes APIs that still need to be documented, this is just a good start. We updated nav_order parameter for some pages as well. Relevant ticket: #424 Signed-off-by: Lukáš Vlček --- _opensearch/rest-api/cluster-stats.md | 2 +- _opensearch/rest-api/ingest-apis/index.md | 2 +- _opensearch/rest-api/nodes-apis/index.md | 72 ++++++++++ .../rest-api/nodes-apis/nodes-hot-threads.md | 101 ++++++++++++++ _opensearch/rest-api/nodes-apis/nodes-info.md | 131 ++++++++++++++++++ 5 files changed, 306 insertions(+), 2 deletions(-) create mode 100644 _opensearch/rest-api/nodes-apis/index.md create mode 100644 _opensearch/rest-api/nodes-apis/nodes-hot-threads.md create mode 100644 _opensearch/rest-api/nodes-apis/nodes-info.md diff --git a/_opensearch/rest-api/cluster-stats.md b/_opensearch/rest-api/cluster-stats.md index 1eef74d0..fb7528a9 100644 --- a/_opensearch/rest-api/cluster-stats.md +++ b/_opensearch/rest-api/cluster-stats.md @@ -31,7 +31,7 @@ All cluster stats parameters are optional. Parameter | Type | Description :--- | :--- | :--- -<node-filters> | List | A comma-separated list of node-filters that OpenSearch uses to filter results. Available options are `all`, `_local`, `_master`, a node name or ID, `master:true`, `master:false`, `data:true`, `data:false`, `ingest:true`, `ingest:false`, `voting_only:true`, `voting_only:false`, `ml:true`, `ml:false`, `coordinating_only:true`, `coordinating_only:false`, and <custom node attributes> : <attribute values> pairs. +<node-filters> | List | A comma-separated list of [node-filters](../nodes-apis/index/#node-filters) that OpenSearch uses to filter results. ## Response diff --git a/_opensearch/rest-api/ingest-apis/index.md b/_opensearch/rest-api/ingest-apis/index.md index 427484f8..45f0f69b 100644 --- a/_opensearch/rest-api/ingest-apis/index.md +++ b/_opensearch/rest-api/ingest-apis/index.md @@ -3,7 +3,7 @@ layout: default title: Ingest APIs parent: REST API reference has_children: true -nav_order: 3 +nav_order: 4 redirect_from: - /opensearch/rest-api/ingest-apis/ --- diff --git a/_opensearch/rest-api/nodes-apis/index.md b/_opensearch/rest-api/nodes-apis/index.md new file mode 100644 index 00000000..1928b27f --- /dev/null +++ b/_opensearch/rest-api/nodes-apis/index.md @@ -0,0 +1,72 @@ +--- +layout: default +title: Nodes APIs +parent: REST API reference +has_children: true +nav_order: 5 +--- + +# Nodes APIs + +The nodes API makes it possible to retrieve information about individual cluster nodes. + +--- + +Many nodes APIs support common parameters like `{timeout}`, and `{node-filters}`. + +## Timeout + +The `{timeout}` parameter can be used to change the default time limit for node response. + +Parameter | Type | Description +:--- |:----------| :--- +`{timeout}` | TimeValue | Default value is `30s`. + +## Node filters + +The `{node-filters}` parameter can be used to filter target set of nodes that will be included in the response. + +Parameter | Type | Description +:--- |:-------| :--- +{node-filters} | String | A comma-separated list of resolution mechanisms that OpenSearch uses to identify cluster nodes. + +Node filters support several node resolution mechanisms: + +- pre-defined constants: `_local`, `_cluster_manager` (or deprecated `_master`) or `_all` +- exact match for `nodeID` +- a simple case-sensitive wildcard pattern matching for: `node-name`, `host-name` or `host-IP-address` +- node roles (where `` value is set either to `true` or `false`): + - `cluster_manager:` (or deprecated `master:`) + - `data:` + - `ingest:` + - `voting_only:` + - `ml:` + - `coordinating_only:` +- a simple case-sensitive wildcard pattern matching for node attributes:
`:` (the wildcard matching pattern can be used in both the key and value at the same time) + +The resolution mechanisms are applied sequentially in the order specified by the client and each mechanism specification may either add or remove nodes. + +### Example + +Get statistics from elected cluster-manager node only: +```text +GET /_nodes/_cluster_manager/stats +``` + +Get statistics from nodes that are data-only nodes: +```text +GET /_nodes/data:true/stats +``` +#### Order of resolution mechanisms matters + +The order of resolution mechanisms is applied sequentially and each can add or remove nodes, this means that the following two examples yield different results. + +Get statistics from all the nodes but the cluster-manager node: +```text +GET /_nodes/_all,cluster_namager:false/stats +``` + +However, if we switch the resolution mechanisms then the result will include all the cluster nodes including the cluster manager node. +```text +GET /_nodes/cluster_namager:false,_all/stats +``` \ No newline at end of file diff --git a/_opensearch/rest-api/nodes-apis/nodes-hot-threads.md b/_opensearch/rest-api/nodes-apis/nodes-hot-threads.md new file mode 100644 index 00000000..40a9cf20 --- /dev/null +++ b/_opensearch/rest-api/nodes-apis/nodes-hot-threads.md @@ -0,0 +1,101 @@ +--- +layout: default +title: Nodes hot threads +parent: Nodes APIs +grand_parent: REST API reference +nav_order: 10 +--- + +# Nodes hot threads + +This REST API provide information about busy JVM threads for selected cluster nodes. +It provides a unique view of what activity each node spends time on. + +## Example + +```json +GET /_nodes/hot_threads +``` + +## Path and HTTP methods + +```text +GET /_nodes/hot_threads +GET /_nodes/{nodeId}/hot_threads +``` + +## URL parameters + +You can include the following URL parameters in your request. All parameters are optional. + +Parameter | Type | Description +:--- |:----------| :--- +nodeId | String | A comma-separated list of nodeIds to filter results. Supports [node filters](../index/#node-filters).
Defaults to `_all`. +snapshots | Integer | Number of samples of thread stacktraces.
Defaults to `10`. +interval | TimeValue | Interval between consecutive samples.
Defaults to `500ms`. +threads | Integer | A number of top bussiest threads to return information about. Defaults to `3`. +ignore_idle_threads | Boolean | Don’t show threads that are in known-idle states, such as waiting on a socket select or pulling from an empty task queue.
Defaults to `true`. +type | String | Supported thread types are `cpu`, `wait`, or `block`.
Defaults to `cpu`. +timeout | TimeValue | A request [timeout](../index/#timeout).
Defaults to `30s`. + +## Response + +Unlike majority of OpenSearch responses this response is in text format. +It consists of one section per each cluster node included in the response. + +Each section starts with a single line containing the following segments: + +Line segment | Description +:--- |:------- +:::  | Line start (a distinct visual symbol). +`{global-eu-35}` | Node name. +`{uFPbKLDOTlOmdnwUlKW8sw}` | NodeId. +`{OAM8OT5CQAyasWuIDeVyUA}` | EphemeralId. +`{global-eu-35.local}` | Host name. +`{[gdv2:a284:2acv:5fa6:0:3a2:7260:74cf]:9300}` | Host address. +`{dimr}` | Node roles (d=data, i=ingest, m=cluster manager, r=remote cluster client). +`{zone=west-a2, shard_indexing_pressure_enabled=true}` | Node attributes. + +Then follows information about threads of selected type. + +```text +::: {global-eu-35}{uFPbKLDOTlOmdnwUlKW8sw}{OAM8OT5CQAyasWuIDeVyUA}{global-eu-35.local}{[gdv2:a284:2acv:5fa6:0:3a2:7260:74cf]:9300}{dimr}{zone=west-a2, shard_indexing_pressure_enabled=true} + Hot threads at 2022-04-01T15:15:27.658Z, interval=500ms, busiestThreads=3, ignoreIdleThreads=true: + + 0.1% (645micros out of 500ms) cpu usage by thread 'opensearch[global-eu-35][transport_worker][T#7]' + 4/10 snapshots sharing following 3 elements + io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:986) + io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) + java.base@11.0.14.1/java.lang.Thread.run(Thread.java:829) +::: {global-eu-62}{4knOxAdERlOB19zLQIT1bQ}{HJuZs2HiQ_-8Elj0Fvi_1g}{global-eu-62.local}{[gdv2:a284:2acv:5fa6:0:3a2:bba6:fe3f]:9300}{dimr}{zone=west-a2, shard_indexing_pressure_enabled=true} + Hot threads at 2022-04-01T15:15:27.659Z, interval=500ms, busiestThreads=3, ignoreIdleThreads=true: + + 18.7% (93.4ms out of 500ms) cpu usage by thread 'opensearch[global-eu-62][transport_worker][T#3]' + 6/10 snapshots sharing following 3 elements + io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:986) + io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) + java.base@11.0.14.1/java.lang.Thread.run(Thread.java:829) +::: {global-eu-44}{8WW3hrkcTwGvgah_L8D_jw}{Sok7spHISFyol0jFV6i0kw}{global-eu-44.local}{[gdv2:a284:2acv:5fa6:0:3a2:9120:e79e]:9300}{dimr}{zone=west-a2, shard_indexing_pressure_enabled=true} + Hot threads at 2022-04-01T15:15:27.659Z, interval=500ms, busiestThreads=3, ignoreIdleThreads=true: + + 42.6% (212.7ms out of 500ms) cpu usage by thread 'opensearch[global-eu-44][write][T#5]' + 2/10 snapshots sharing following 43 elements + java.base@11.0.14.1/sun.nio.ch.IOUtil.write1(Native Method) + java.base@11.0.14.1/sun.nio.ch.EPollSelectorImpl.wakeup(EPollSelectorImpl.java:254) + io.netty.channel.nio.NioEventLoop.wakeup(NioEventLoop.java:787) + io.netty.util.concurrent.SingleThreadEventExecutor.execute(SingleThreadEventExecutor.java:846) + io.netty.util.concurrent.SingleThreadEventExecutor.execute(SingleThreadEventExecutor.java:815) + io.netty.channel.AbstractChannelHandlerContext.safeExecute(AbstractChannelHandlerContext.java:989) + io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:796) + io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:758) + io.netty.channel.DefaultChannelPipeline.writeAndFlush(DefaultChannelPipeline.java:1020) + io.netty.channel.AbstractChannel.writeAndFlush(AbstractChannel.java:311) + org.opensearch.transport.netty4.Netty4TcpChannel.sendMessage(Netty4TcpChannel.java:159) + app//org.opensearch.transport.OutboundHan... +``` + +## Required permissions + +If you use the security plugin, make sure you have the appropriate permissions: +`cluster:monitor/nodes/hot_threads` +{: .note } \ No newline at end of file diff --git a/_opensearch/rest-api/nodes-apis/nodes-info.md b/_opensearch/rest-api/nodes-apis/nodes-info.md new file mode 100644 index 00000000..bc7ca130 --- /dev/null +++ b/_opensearch/rest-api/nodes-apis/nodes-info.md @@ -0,0 +1,131 @@ +--- +layout: default +title: Nodes info +parent: Nodes APIs +grand_parent: REST API reference +nav_order: 20 +--- + +# Nodes info + +Represents mostly static information about cluster nodes. +Such as host system information, JVM, processor type, or specific +node information like node settings, thread pools settings, installed plugins, and more. + +## Example + +```json +# Get information from all cluster nodes +GET /_nodes + +# Get thread pool information from the cluster manager node only +GET /_nodes/master:true/thread_pool?pretty +``` + +## Path and HTTP methods + +```text +GET /_nodes +GET /_nodes/{nodeId} +GET /_nodes/{metrics} +GET /_nodes/{nodeId}/{metrics} +# or full path equivalent +GET /_nodes/{nodeId}/info/{metrics} +``` + +## URL parameters + +You can include the following URL parameters in your request. All parameters are optional. + +Parameter | Type | Description +:--- |:-------| :--- +nodeId | String | A comma-separated list of nodeIds to filter results. Supports [node filters](../index/#node-filters).
Defaults to `_all`. +metrics | String | A comma-separated list of metric groups that will be included in the response. For example `jvm,thread_pools`.
Defaults to all metrics. +timeout | TimeValue | A request [timeout](../index/#timeout).
Defaults to `30s`. + +The following are listed all available metric groups: + +Metric | Description +:--- |:---- +`settings` | A node settings. This is combination of the default settings, custom settings from [configuration file](../../../configuration/#configuration-file) and dynamically [updated settings](../../../configuration/#update-cluster-settings-using-the-api). +`os` | Static information about host os, including version, processor architecture and available/allocated processors. +`process` | Contains process id. +`jvm` | Detailed static information about running JVM, including arguments. +`thread_pool` | Configured options for all individual thread pools (type, size ... etc). +`transport` | Mostly static information about transport layer. +`http` | Mostly static information about http layer. +`plugins` | Information about installed plugins and modules. +`ingest` | Information about ingets pipelines and available ingest processors. +`aggregations` | Information about available [aggregations](../../../aggregations). +`indices` | Static index settings configured at the node level. + +## Response + +The response contains basic node identification and build info for every node +matching the `{nodeId}` request parameter. + +Metric | Description +:--- |:---- +name | A node name. +transport_address | A node transport address. +host | A node host address. +ip | A node host ip address. +version | A node OpenSearch version. +build_type | A build type, like `rpm`,`docker`, `zip` ... etc. +build_hash | A git commit hash of the build. +roles | A node roles. +attributes | A node attributes. + +On top of that it will contain one or more metric groups depending on `{metrics}` request parameter. + +```json +GET /_nodes/master:true/process,transport?pretty + +{ + "_nodes": { + "total": 1, + "successful": 1, + "failed": 0 + }, + "cluster_name": "opensearch", + "nodes": { + "VC0d4RgbTM6kLDwuud2XZQ": { + "name": "node-m1-23", + "transport_address": "127.0.0.1:9300", + "host": "127.0.0.1", + "ip": "127.0.0.1", + "version": "1.3.1", + "build_type": "tar", + "build_hash": "c4c0672877bf0f787ca857c7c37b775967f93d81", + "roles": [ + "data", + "ingest", + "master", + "remote_cluster_client" + ], + "attributes": { + "shard_indexing_pressure_enabled": "true" + }, + "process" : { + "refresh_interval_in_millis": 1000, + "id": 44584, + "mlockall": false + }, + "transport": { + "bound_address": [ + "[::1]:9300", + "127.0.0.1:9300" + ], + "publish_address": "127.0.0.1:9300", + "profiles": { } + } + } + } +} +``` + +## Required permissions + +If you use the security plugin, make sure you have the appropriate permissions: +`cluster:monitor/nodes/info` +{: .note } \ No newline at end of file From bde449d48a64a1459dae5f69767a10b386a05d70 Mon Sep 17 00:00:00 2001 From: Naarcha-AWS Date: Wed, 18 May 2022 10:34:34 -0500 Subject: [PATCH 2/5] Writer review Signed-off-by: Naarcha-AWS --- _opensearch/rest-api/nodes-apis/index.md | 49 +++++++++---------- .../rest-api/nodes-apis/nodes-hot-threads.md | 27 +++++----- _opensearch/rest-api/nodes-apis/nodes-info.md | 41 +++++++++------- 3 files changed, 61 insertions(+), 56 deletions(-) diff --git a/_opensearch/rest-api/nodes-apis/index.md b/_opensearch/rest-api/nodes-apis/index.md index 1928b27f..97b4b1d1 100644 --- a/_opensearch/rest-api/nodes-apis/index.md +++ b/_opensearch/rest-api/nodes-apis/index.md @@ -8,11 +8,7 @@ nav_order: 5 # Nodes APIs -The nodes API makes it possible to retrieve information about individual cluster nodes. - ---- - -Many nodes APIs support common parameters like `{timeout}`, and `{node-filters}`. +The nodes API makes it possible to retrieve information about individual nodes within your cluster. It supports standard parameters such `{timeout}` and `{node-filters}`. ## Timeout @@ -24,49 +20,52 @@ Parameter | Type | Description ## Node filters -The `{node-filters}` parameter can be used to filter target set of nodes that will be included in the response. +Use the `{node-filters}` parameter to filter the target set of nodes in the API response. Parameter | Type | Description :--- |:-------| :--- -
{node-filters} | String | A comma-separated list of resolution mechanisms that OpenSearch uses to identify cluster nodes. +{node-filters} | String | A comma-separated list of resolution mechanisms that OpenSearch uses to identify cluster nodes. Node filters support several node resolution mechanisms: -- pre-defined constants: `_local`, `_cluster_manager` (or deprecated `_master`) or `_all` -- exact match for `nodeID` -- a simple case-sensitive wildcard pattern matching for: `node-name`, `host-name` or `host-IP-address` -- node roles (where `` value is set either to `true` or `false`): - - `cluster_manager:` (or deprecated `master:`) +- Pre-defined constants: `_local`, `_cluster_manager`, or `_all` +- Exact match for `nodeID` +- A simple case-sensitive wildcard pattern matching for `node-name`, `host-name`, or `host-IP-address` +- Node roles where the `` value is set either to `true` or `false`): + - `cluster_manager:` - `data:` - `ingest:` - `voting_only:` - `ml:` - `coordinating_only:` -- a simple case-sensitive wildcard pattern matching for node attributes:
`:` (the wildcard matching pattern can be used in both the key and value at the same time) +- A simple case-sensitive wildcard pattern matching for node attributes: `:`. The wildcard matching pattern can be used in both the key and value at the same time. -The resolution mechanisms are applied sequentially in the order specified by the client and each mechanism specification may either add or remove nodes. +Resolution mechanisms are applied sequentially in the order specified by the client. Each mechanism specification can either add or remove nodes. -### Example +If you want to get statistics from the elected cluster-manager node only, use: -Get statistics from elected cluster-manager node only: -```text +```bash GET /_nodes/_cluster_manager/stats ``` -Get statistics from nodes that are data-only nodes: -```text +If you want to get statistics from nodes that are data-only nodes, use: + +```bash GET /_nodes/data:true/stats ``` -#### Order of resolution mechanisms matters -The order of resolution mechanisms is applied sequentially and each can add or remove nodes, this means that the following two examples yield different results. +### Order of resolution mechanisms -Get statistics from all the nodes but the cluster-manager node: -```text +The order of resolution mechanisms is applied sequentially, and each can add or remove nodes. The following examples means yield different results: + +If you want to get statistics from all the nodes but the cluster-manager node, use: + +```bash GET /_nodes/_all,cluster_namager:false/stats ``` -However, if we switch the resolution mechanisms then the result will include all the cluster nodes including the cluster manager node. -```text +However, if we switch the resolution mechanisms, then the result will include all the cluster nodes including the cluster manager node. + +```bash GET /_nodes/cluster_namager:false,_all/stats ``` \ No newline at end of file diff --git a/_opensearch/rest-api/nodes-apis/nodes-hot-threads.md b/_opensearch/rest-api/nodes-apis/nodes-hot-threads.md index 40a9cf20..cfda93ab 100644 --- a/_opensearch/rest-api/nodes-apis/nodes-hot-threads.md +++ b/_opensearch/rest-api/nodes-apis/nodes-hot-threads.md @@ -19,7 +19,7 @@ GET /_nodes/hot_threads ## Path and HTTP methods -```text +```bash GET /_nodes/hot_threads GET /_nodes/{nodeId}/hot_threads ``` @@ -28,19 +28,20 @@ GET /_nodes/{nodeId}/hot_threads You can include the following URL parameters in your request. All parameters are optional. -Parameter | Type | Description +Parameter | Type | Description :--- |:----------| :--- -nodeId | String | A comma-separated list of nodeIds to filter results. Supports [node filters](../index/#node-filters).
Defaults to `_all`. -snapshots | Integer | Number of samples of thread stacktraces.
Defaults to `10`. -interval | TimeValue | Interval between consecutive samples.
Defaults to `500ms`. -threads | Integer | A number of top bussiest threads to return information about. Defaults to `3`. -ignore_idle_threads | Boolean | Don’t show threads that are in known-idle states, such as waiting on a socket select or pulling from an empty task queue.
Defaults to `true`. -type | String | Supported thread types are `cpu`, `wait`, or `block`.
Defaults to `cpu`. -timeout | TimeValue | A request [timeout](../index/#timeout).
Defaults to `30s`. +nodeId | String | A comma-separated list of nodeIds to filter results. Supports [node filters](../index/#node-filters). Defaults to `_all`. +snapshots | Integer | Number of samples of thread stacktraces.Defaults to `10`. +interval | TimeValue | Interval between consecutive samples. Defaults to `500ms`. +threads | Integer | A number of top busiest threads to return information about. Defaults to `3`. +ignore_idle_threads | Boolean | Don’t show threads that are in known-idle states, such as waiting on a socket select or pulling from an empty task queue. Defaults to `true`. +type | String | Supported thread types are `cpu`, `wait`, or `block`. Defaults to `cpu`. +timeout | TimeValue | A request [timeout](../index/#timeout). Defaults to `30s`. ## Response -Unlike majority of OpenSearch responses this response is in text format. +Unlike majority of OpenSearch API responses, this response is in a text format. + It consists of one section per each cluster node included in the response. Each section starts with a single line containing the following segments: @@ -58,7 +59,7 @@ Line segment | Description Then follows information about threads of selected type. -```text +```bash ::: {global-eu-35}{uFPbKLDOTlOmdnwUlKW8sw}{OAM8OT5CQAyasWuIDeVyUA}{global-eu-35.local}{[gdv2:a284:2acv:5fa6:0:3a2:7260:74cf]:9300}{dimr}{zone=west-a2, shard_indexing_pressure_enabled=true} Hot threads at 2022-04-01T15:15:27.658Z, interval=500ms, busiestThreads=3, ignoreIdleThreads=true: @@ -96,6 +97,4 @@ Then follows information about threads of selected type. ## Required permissions -If you use the security plugin, make sure you have the appropriate permissions: -`cluster:monitor/nodes/hot_threads` -{: .note } \ No newline at end of file +If you use the security plugin, make sure you set the following permissions: `cluster:monitor/nodes/hot_threads`. diff --git a/_opensearch/rest-api/nodes-apis/nodes-info.md b/_opensearch/rest-api/nodes-apis/nodes-info.md index bc7ca130..8c7f6712 100644 --- a/_opensearch/rest-api/nodes-apis/nodes-info.md +++ b/_opensearch/rest-api/nodes-apis/nodes-info.md @@ -8,23 +8,32 @@ nav_order: 20 # Nodes info -Represents mostly static information about cluster nodes. -Such as host system information, JVM, processor type, or specific -node information like node settings, thread pools settings, installed plugins, and more. +Represents mostly static information about your cluster's nodes, including but not limited to: + +- Host system information +- JVM +- Processor Type +- Node settings +- Thread pools settings +- Installed plugins ## Example -```json -# Get information from all cluster nodes -GET /_nodes +To get information on all nodes in a cluster: -# Get thread pool information from the cluster manager node only +```bash +GET /_nodes +``` + +To get thread pool information from the cluster manager node only: + +```bash GET /_nodes/master:true/thread_pool?pretty ``` ## Path and HTTP methods -```text +```bash GET /_nodes GET /_nodes/{nodeId} GET /_nodes/{metrics} @@ -39,11 +48,11 @@ You can include the following URL parameters in your request. All parameters are Parameter | Type | Description :--- |:-------| :--- -nodeId | String | A comma-separated list of nodeIds to filter results. Supports [node filters](../index/#node-filters).
Defaults to `_all`. -metrics | String | A comma-separated list of metric groups that will be included in the response. For example `jvm,thread_pools`.
Defaults to all metrics. -timeout | TimeValue | A request [timeout](../index/#timeout).
Defaults to `30s`. +nodeId | String | A comma-separated list of nodeIds to filter results. Supports [node filters](../index/#node-filters). Defaults to `_all`. +metrics | String | A comma-separated list of metric groups that will be included in the response. For example `jvm,thread_pools`. Defaults to all metrics. +timeout | TimeValue | A request [timeout](../index/#timeout). Defaults to `30s`. -The following are listed all available metric groups: +The following are listed for all available metric groups: Metric | Description :--- |:---- @@ -71,12 +80,12 @@ transport_address | A node transport address. host | A node host address. ip | A node host ip address. version | A node OpenSearch version. -build_type | A build type, like `rpm`,`docker`, `zip` ... etc. +build_type | A build type, like `rpm`,`docker`, `zip`, etc. build_hash | A git commit hash of the build. roles | A node roles. attributes | A node attributes. -On top of that it will contain one or more metric groups depending on `{metrics}` request parameter. +The response also contains one or more metric groups depending on `{metrics}` request parameter. ```json GET /_nodes/master:true/process,transport?pretty @@ -126,6 +135,4 @@ GET /_nodes/master:true/process,transport?pretty ## Required permissions -If you use the security plugin, make sure you have the appropriate permissions: -`cluster:monitor/nodes/info` -{: .note } \ No newline at end of file +If you use the security plugin, make sure you have the appropriate permissions: `cluster:monitor/nodes/info`. From 6b2042745efc233bef2bd49b7a6ff2c0e5341c6c Mon Sep 17 00:00:00 2001 From: Naarcha-AWS Date: Wed, 18 May 2022 12:54:11 -0500 Subject: [PATCH 3/5] Add feedback Signed-off-by: Naarcha-AWS --- _opensearch/rest-api/nodes-apis/index.md | 6 +++--- _opensearch/rest-api/nodes-apis/nodes-hot-threads.md | 5 ++--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/_opensearch/rest-api/nodes-apis/index.md b/_opensearch/rest-api/nodes-apis/index.md index 97b4b1d1..66be072d 100644 --- a/_opensearch/rest-api/nodes-apis/index.md +++ b/_opensearch/rest-api/nodes-apis/index.md @@ -56,12 +56,12 @@ GET /_nodes/data:true/stats ### Order of resolution mechanisms -The order of resolution mechanisms is applied sequentially, and each can add or remove nodes. The following examples means yield different results: +The order of resolution mechanisms is applied sequentially, and each can add or remove nodes. The following examples yield different results: -If you want to get statistics from all the nodes but the cluster-manager node, use: +If you want to get statistics from all the nodes but the cluster manager node, use: ```bash -GET /_nodes/_all,cluster_namager:false/stats +GET /_nodes/_all,cluster_manager:false/stats ``` However, if we switch the resolution mechanisms, then the result will include all the cluster nodes including the cluster manager node. diff --git a/_opensearch/rest-api/nodes-apis/nodes-hot-threads.md b/_opensearch/rest-api/nodes-apis/nodes-hot-threads.md index cfda93ab..cfae8a4d 100644 --- a/_opensearch/rest-api/nodes-apis/nodes-hot-threads.md +++ b/_opensearch/rest-api/nodes-apis/nodes-hot-threads.md @@ -8,8 +8,7 @@ nav_order: 10 # Nodes hot threads -This REST API provide information about busy JVM threads for selected cluster nodes. -It provides a unique view of what activity each node spends time on. +The nodes hot threads endpoint provides information about busy JVM threads for selected cluster nodes. It provides a unique view of the of activity each node. ## Example @@ -40,7 +39,7 @@ timeout | TimeValue | A request [timeout](../index/#timeout). Defaults to `30s`. ## Response -Unlike majority of OpenSearch API responses, this response is in a text format. +Unlike the majority of OpenSearch API responses, this response is in a text format. It consists of one section per each cluster node included in the response. From 03807527ebbb7702ee887155ae63dd353f1c74cc Mon Sep 17 00:00:00 2001 From: Naarcha-AWS Date: Wed, 18 May 2022 13:00:47 -0500 Subject: [PATCH 4/5] More feedback Signed-off-by: Naarcha-AWS --- _opensearch/rest-api/nodes-apis/nodes-hot-threads.md | 4 ++-- _opensearch/rest-api/nodes-apis/nodes-info.md | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/_opensearch/rest-api/nodes-apis/nodes-hot-threads.md b/_opensearch/rest-api/nodes-apis/nodes-hot-threads.md index cfae8a4d..08011b56 100644 --- a/_opensearch/rest-api/nodes-apis/nodes-hot-threads.md +++ b/_opensearch/rest-api/nodes-apis/nodes-hot-threads.md @@ -29,8 +29,8 @@ You can include the following URL parameters in your request. All parameters are Parameter | Type | Description :--- |:----------| :--- -nodeId | String | A comma-separated list of nodeIds to filter results. Supports [node filters](../index/#node-filters). Defaults to `_all`. -snapshots | Integer | Number of samples of thread stacktraces.Defaults to `10`. +nodeId | String | A comma-separated list of node IDs to filter results. Supports [node filters](../index/#node-filters). Defaults to `_all`. +snapshots | Integer | Number of samples of thread stacktraces. Defaults to `10`. interval | TimeValue | Interval between consecutive samples. Defaults to `500ms`. threads | Integer | A number of top busiest threads to return information about. Defaults to `3`. ignore_idle_threads | Boolean | Don’t show threads that are in known-idle states, such as waiting on a socket select or pulling from an empty task queue. Defaults to `true`. diff --git a/_opensearch/rest-api/nodes-apis/nodes-info.md b/_opensearch/rest-api/nodes-apis/nodes-info.md index 8c7f6712..a0d2c997 100644 --- a/_opensearch/rest-api/nodes-apis/nodes-info.md +++ b/_opensearch/rest-api/nodes-apis/nodes-info.md @@ -56,15 +56,15 @@ The following are listed for all available metric groups: Metric | Description :--- |:---- -`settings` | A node settings. This is combination of the default settings, custom settings from [configuration file](../../../configuration/#configuration-file) and dynamically [updated settings](../../../configuration/#update-cluster-settings-using-the-api). -`os` | Static information about host os, including version, processor architecture and available/allocated processors. -`process` | Contains process id. +`settings` | A node's settings. This is combination of the default settings, custom settings from [configuration file](../../../configuration/#configuration-file) and dynamically [updated settings](../../../configuration/#update-cluster-settings-using-the-api). +`os` | Static information about the host OS, including version, processor architecture and available/allocated processors. +`process` | Contains process OD. `jvm` | Detailed static information about running JVM, including arguments. -`thread_pool` | Configured options for all individual thread pools (type, size ... etc). +`thread_pool` | Configured options for all individual thread pools. `transport` | Mostly static information about transport layer. `http` | Mostly static information about http layer. `plugins` | Information about installed plugins and modules. -`ingest` | Information about ingets pipelines and available ingest processors. +`ingest` | Information about ingest pipelines and available ingest processors. `aggregations` | Information about available [aggregations](../../../aggregations). `indices` | Static index settings configured at the node level. From 6ad4d0006004a4c178e3d043235f16954e93af5e Mon Sep 17 00:00:00 2001 From: Naarcha-AWS Date: Thu, 19 May 2022 10:23:12 -0500 Subject: [PATCH 5/5] Add editorial review Signed-off-by: Naarcha-AWS --- _opensearch/rest-api/cluster-stats.md | 2 +- _opensearch/rest-api/nodes-apis/index.md | 16 ++++++++-------- _opensearch/rest-api/nodes-apis/nodes-info.md | 8 ++++---- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/_opensearch/rest-api/cluster-stats.md b/_opensearch/rest-api/cluster-stats.md index fb7528a9..c279e947 100644 --- a/_opensearch/rest-api/cluster-stats.md +++ b/_opensearch/rest-api/cluster-stats.md @@ -31,7 +31,7 @@ All cluster stats parameters are optional. Parameter | Type | Description :--- | :--- | :--- -<node-filters> | List | A comma-separated list of [node-filters](../nodes-apis/index/#node-filters) that OpenSearch uses to filter results. +<node-filters> | List | A comma-separated list of [node filters](../nodes-apis/index/#node-filters) that OpenSearch uses to filter results. ## Response diff --git a/_opensearch/rest-api/nodes-apis/index.md b/_opensearch/rest-api/nodes-apis/index.md index 66be072d..4174c502 100644 --- a/_opensearch/rest-api/nodes-apis/index.md +++ b/_opensearch/rest-api/nodes-apis/index.md @@ -1,12 +1,12 @@ --- layout: default -title: Nodes APIs +title: Nodes API parent: REST API reference has_children: true nav_order: 5 --- -# Nodes APIs +# Nodes API The nodes API makes it possible to retrieve information about individual nodes within your cluster. It supports standard parameters such `{timeout}` and `{node-filters}`. @@ -26,10 +26,10 @@ Parameter | Type | Description :--- |:-------| :--- {node-filters} | String | A comma-separated list of resolution mechanisms that OpenSearch uses to identify cluster nodes. -Node filters support several node resolution mechanisms: +Node filters support several node resolution mechanisms. -- Pre-defined constants: `_local`, `_cluster_manager`, or `_all` -- Exact match for `nodeID` +- Pre defined constants: `_local`, `_cluster_manager`, or `_all` +- An exact match for `nodeID` - A simple case-sensitive wildcard pattern matching for `node-name`, `host-name`, or `host-IP-address` - Node roles where the `` value is set either to `true` or `false`): - `cluster_manager:` @@ -42,13 +42,13 @@ Node filters support several node resolution mechanisms: Resolution mechanisms are applied sequentially in the order specified by the client. Each mechanism specification can either add or remove nodes. -If you want to get statistics from the elected cluster-manager node only, use: +If you want to get statistics from the elected cluster manager node only, use the following: ```bash GET /_nodes/_cluster_manager/stats ``` -If you want to get statistics from nodes that are data-only nodes, use: +If you want to get statistics from nodes that are data-only nodes, use the following: ```bash GET /_nodes/data:true/stats @@ -58,7 +58,7 @@ GET /_nodes/data:true/stats The order of resolution mechanisms is applied sequentially, and each can add or remove nodes. The following examples yield different results: -If you want to get statistics from all the nodes but the cluster manager node, use: +If you want to get statistics from all the nodes but the cluster manager node, use the following: ```bash GET /_nodes/_all,cluster_manager:false/stats diff --git a/_opensearch/rest-api/nodes-apis/nodes-info.md b/_opensearch/rest-api/nodes-apis/nodes-info.md index a0d2c997..56ca6309 100644 --- a/_opensearch/rest-api/nodes-apis/nodes-info.md +++ b/_opensearch/rest-api/nodes-apis/nodes-info.md @@ -61,8 +61,8 @@ Metric | Description `process` | Contains process OD. `jvm` | Detailed static information about running JVM, including arguments. `thread_pool` | Configured options for all individual thread pools. -`transport` | Mostly static information about transport layer. -`http` | Mostly static information about http layer. +`transport` | Mostly static information about the transport layer. +`http` | Mostly static information about the HTTP layer. `plugins` | Information about installed plugins and modules. `ingest` | Information about ingest pipelines and available ingest processors. `aggregations` | Information about available [aggregations](../../../aggregations). @@ -82,10 +82,10 @@ ip | A node host ip address. version | A node OpenSearch version. build_type | A build type, like `rpm`,`docker`, `zip`, etc. build_hash | A git commit hash of the build. -roles | A node roles. +roles | A node's role. attributes | A node attributes. -The response also contains one or more metric groups depending on `{metrics}` request parameter. +The response also contains one or more metric groups, depending on the `{metrics}` request parameter. ```json GET /_nodes/master:true/process,transport?pretty