Writer review

Signed-off-by: Naarcha-AWS <naarcha@amazon.com>
This commit is contained in:
Naarcha-AWS 2022-05-18 10:34:34 -05:00
parent af4042887c
commit bde449d48a
3 changed files with 61 additions and 56 deletions

View File

@ -8,11 +8,7 @@ nav_order: 5
# Nodes APIs # Nodes APIs
The nodes API makes it possible to retrieve information about individual cluster nodes. The nodes API makes it possible to retrieve information about individual nodes within your cluster. It supports standard parameters such `{timeout}` and `{node-filters}`.
---
Many nodes APIs support common parameters like `{timeout}`, and `{node-filters}`.
## Timeout ## Timeout
@ -24,49 +20,52 @@ Parameter | Type | Description
## Node filters ## 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 Parameter | Type | Description
:--- |:-------| :--- :--- |:-------| :---
<code><nobr>{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: Node filters support several node resolution mechanisms:
- pre-defined constants: `_local`, `_cluster_manager` (or deprecated `_master`) or `_all` - Pre-defined constants: `_local`, `_cluster_manager`, or `_all`
- exact match for `nodeID` - Exact match for `nodeID`
- a simple case-sensitive wildcard pattern matching for: `node-name`, `host-name` or `host-IP-address` - A simple case-sensitive wildcard pattern matching for `node-name`, `host-name`, or `host-IP-address`
- node roles (where `<bool>` value is set either to `true` or `false`): - Node roles where the `<bool>` value is set either to `true` or `false`):
- `cluster_manager:<bool>` (or deprecated `master:<bool>`) - `cluster_manager:<bool>`
- `data:<bool>` - `data:<bool>`
- `ingest:<bool>` - `ingest:<bool>`
- `voting_only:<bool>` - `voting_only:<bool>`
- `ml:<bool>` - `ml:<bool>`
- `coordinating_only:<bool>` - `coordinating_only:<bool>`
- a simple case-sensitive wildcard pattern matching for node attributes: <br>`<node attribute*>:<attribute value*>` (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: `<node attribute*>:<attribute value*>`. 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: ```bash
```text
GET /_nodes/_cluster_manager/stats GET /_nodes/_cluster_manager/stats
``` ```
Get statistics from nodes that are data-only nodes: If you want to get statistics from nodes that are data-only nodes, use:
```text
```bash
GET /_nodes/data:true/stats 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: The order of resolution mechanisms is applied sequentially, and each can add or remove nodes. The following examples means yield different results:
```text
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_namager:false/stats
``` ```
However, if we switch the resolution mechanisms then the result will include all the cluster nodes including the cluster manager node. However, if we switch the resolution mechanisms, then the result will include all the cluster nodes including the cluster manager node.
```text
```bash
GET /_nodes/cluster_namager:false,_all/stats GET /_nodes/cluster_namager:false,_all/stats
``` ```

View File

@ -19,7 +19,7 @@ GET /_nodes/hot_threads
## Path and HTTP methods ## Path and HTTP methods
```text ```bash
GET /_nodes/hot_threads GET /_nodes/hot_threads
GET /_nodes/{nodeId}/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. 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).<br>Defaults to `_all`. 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.<br>Defaults to `10`. snapshots | Integer | Number of samples of thread stacktraces.Defaults to `10`.
interval | TimeValue | Interval between consecutive samples.<br>Defaults to `500ms`. interval | TimeValue | Interval between consecutive samples. Defaults to `500ms`.
threads | Integer | A number of top bussiest threads to return information about. Defaults to `3`. threads | Integer | A number of top busiest threads to return information about. Defaults to `3`.
ignore_idle_threads | Boolean | Dont show threads that are in known-idle states, such as waiting on a socket select or pulling from an empty task queue.<br>Defaults to `true`. ignore_idle_threads | Boolean | Dont 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`.<br>Defaults to `cpu`. type | String | Supported thread types are `cpu`, `wait`, or `block`. Defaults to `cpu`.
timeout | TimeValue | A request [timeout](../index/#timeout).<br>Defaults to `30s`. timeout | TimeValue | A request [timeout](../index/#timeout). Defaults to `30s`.
## Response ## 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. It consists of one section per each cluster node included in the response.
Each section starts with a single line containing the following segments: 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. 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} ::: {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: 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 ## Required permissions
If you use the security plugin, make sure you have the appropriate permissions: If you use the security plugin, make sure you set the following permissions: `cluster:monitor/nodes/hot_threads`.
`cluster:monitor/nodes/hot_threads`
{: .note }

View File

@ -8,23 +8,32 @@ nav_order: 20
# Nodes info # Nodes info
Represents mostly static information about cluster nodes. Represents mostly static information about your cluster's nodes, including but not limited to:
Such as host system information, JVM, processor type, or specific
node information like node settings, thread pools settings, installed plugins, and more. - Host system information
- JVM
- Processor Type
- Node settings
- Thread pools settings
- Installed plugins
## Example ## Example
```json To get information on all nodes in a cluster:
# Get information from all cluster nodes
GET /_nodes
# 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 GET /_nodes/master:true/thread_pool?pretty
``` ```
## Path and HTTP methods ## Path and HTTP methods
```text ```bash
GET /_nodes GET /_nodes
GET /_nodes/{nodeId} GET /_nodes/{nodeId}
GET /_nodes/{metrics} GET /_nodes/{metrics}
@ -39,11 +48,11 @@ You can include the following URL parameters in your request. All parameters are
Parameter | Type | Description Parameter | Type | Description
:--- |:-------| :--- :--- |:-------| :---
nodeId | String | A comma-separated list of nodeIds to filter results. Supports [node filters](../index/#node-filters).<br>Defaults to `_all`. 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`.<br>Defaults to all metrics. 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).<br>Defaults to `30s`. 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 Metric | Description
:--- |:---- :--- |:----
@ -71,12 +80,12 @@ transport_address | A node transport address.
host | A node host address. host | A node host address.
ip | A node host ip address. ip | A node host ip address.
version | A node OpenSearch version. 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. build_hash | A git commit hash of the build.
roles | A node roles. roles | A node roles.
attributes | A node attributes. 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 ```json
GET /_nodes/master:true/process,transport?pretty GET /_nodes/master:true/process,transport?pretty
@ -126,6 +135,4 @@ GET /_nodes/master:true/process,transport?pretty
## Required permissions ## Required permissions
If you use the security plugin, make sure you have the appropriate permissions: If you use the security plugin, make sure you have the appropriate permissions: `cluster:monitor/nodes/info`.
`cluster:monitor/nodes/info`
{: .note }