This version of the OpenSearch documentation is no longer maintained. For the latest version, see the current documentation. For information about OpenSearch version maintenance, see Release Schedule and Maintenance Policy.
The nodes API makes it possible to retrieve information about individual nodes within your cluster.
<node-filters> parameter to filter the target set of nodes in the API response.
| ||String||A comma-separated list of resolution mechanisms that OpenSearch uses to identify cluster nodes.|
Node filters support several node resolution mechanisms:
- Predefined constants:
- An exact match for
- A simple case-sensitive wildcard pattern matching for
- Node roles where the
<bool>value is set either to
cluster_manager:<bool>refers to all cluster manager-eligible nodes.
data:<bool>refers to all data nodes.
ingest:<bool>refers to all ingest nodes.
voting_only:<bool>refers to all voting-only nodes.
ml:<bool>refers to all machine learning (ML) nodes.
coordinating_only:<bool>refers to all coordinating-only nodes.
- 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.
Resolution mechanisms are applied sequentially in the order specified by the client. Each mechanism specification can either add or remove nodes.
To get statistics from the elected cluster manager node only, use the following query :
To get statistics from nodes that are data-only nodes, use the following query:
Order of resolution mechanisms
The order of resolution mechanisms is applied sequentially, and each can add or remove nodes. The following examples yield different results.
To get statistics from all the nodes except the cluster manager node, use the following query:
However, if you switch the resolution mechanisms, the result will include all the cluster nodes, including the cluster manager node: