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
@@ -51,7 +53,6 @@ For example, the following `traceparent` value would produce the following `trac
51
53
`trace.id`: 0af7651916cd43dd8448eb211c80319c
52
54
```
53
55
54
-
55
56
## GET and POST requests [get-requests]
56
57
57
58
A number of {{es}} GET APIs—most notably the search API—support a request body. While the GET action makes sense in the context of retrieving information, GET requests with a body are not supported by all HTTP libraries. All {{es}} GET APIs that require a body can also be submitted as POST requests. Alternatively, you can pass the request body as the [`source` query string parameter](#api-request-body-query-string) when using GET.
@@ -369,7 +370,6 @@ Global index templates that match all indices are not applied to hidden indices.
369
370
Direct access to system indices is deprecated and will no longer be allowed in a future major version.
370
371
::::
371
372
372
-
373
373
To view system indices within cluster:
374
374
375
375
```console
@@ -380,7 +380,61 @@ GET _cluster/state/metadata?filter_path=metadata.indices.*.system
380
380
When overwriting current cluster state, system indices should be restored as part of their [feature state](docs-content://deploy-manage/tools/snapshot-and-restore.md#feature-state).
381
381
::::
382
382
383
+
### Node specification [cluster-nodes]
384
+
385
+
Some cluster-level APIs may operate on a subset of the nodes which can be specified with node filters.
386
+
For example, [task management]({{es-apis}}group/endpoint-tasks), [node stats]({{es-apis}}operation/operation-nodes-stats), and [node info]({{es-apis}}operation/operation-nodes-info-1) APIs can all report results from a filtered set of nodes rather than from all nodes.
387
+
388
+
Node filters are written as a comma-separated list of individual filters, each of which adds or removes nodes from the chosen subset.
389
+
Each filter can be one of the following:
390
+
391
+
*`_all`, to add all nodes to the subset.
392
+
*`_local`, to add the local node to the subset.
393
+
*`_master`, to add the currently-elected master node to the subset.
394
+
* a node ID or name, to add this node to the subset.
395
+
* an IP address or hostname, to add all matching nodes to the subset.
396
+
* a pattern, using `*` wildcards, which adds all nodes to the subset whose name, address, or hostname matches the pattern.
397
+
*`master:true`, `data:true`, `ingest:true`, `voting_only:true`, `ml:true`, or `coordinating_only:true`, which respectively add to the subset all master-eligible nodes, all data nodes, all ingest nodes, all voting-only nodes, all machine learning nodes, and all coordinating-only nodes.
398
+
*`master:false`, `data:false`, `ingest:false`, `voting_only:false`, `ml:false`, or `coordinating_only:false`, which respectively remove from the subset all master-eligible nodes, all data nodes, all ingest nodes, all voting-only nodes, all machine learning nodes, and all coordinating-only nodes.
399
+
* a pair of patterns, using `*` wildcards, of the form `attrname:attrvalue`, which adds to the subset all nodes with a [custom node attribute](/reference/elasticsearch/configuration-reference/node-settings.md#custom-node-attributes) whose name and value match the respective patterns. Custom node attributes are configured by setting properties in the configuration file of the form `node.attr.attrname: attrvalue`.
383
400
401
+
Node filters run in the order in which they are given, which is important if using filters that remove nodes from the set.
402
+
For example, `_all,master:false` means all the nodes except the master-eligible ones.
403
+
`master:false,_all` means the same as `_all` because the `_all` filter runs after the `master:false` filter.
404
+
405
+
If no filters are given, the default is to select all nodes.
406
+
If any filters are specified, they run starting with an empty chosen subset.
407
+
This means that filters such as `master:false` which remove nodes from the chosen subset are only useful if they come after some other filters.
408
+
When used on its own, `master:false` selects no nodes.
409
+
410
+
Here are some examples of the use of node filters with some [cluster APIs]({{es-apis}}group/endpoint-cluster):
411
+
412
+
```sh
413
+
# If no filters are given, the default is to select all nodes
414
+
GET /_nodes
415
+
# Explicitly select all nodes
416
+
GET /_nodes/_all
417
+
# Select just the local node
418
+
GET /_nodes/_local
419
+
# Select the elected master node
420
+
GET /_nodes/_master
421
+
# Select nodes by name, which can include wildcards
422
+
GET /_nodes/node_name_goes_here
423
+
GET /_nodes/node_name_goes_*
424
+
# Select nodes by address, which can include wildcards
425
+
GET /_nodes/10.0.0.3,10.0.0.4
426
+
GET /_nodes/10.0.0.*
427
+
# Select nodes by role
428
+
GET /_nodes/_all,master:false
429
+
GET /_nodes/data:true,ingest:true
430
+
GET /_nodes/coordinating_only:true
431
+
GET /_nodes/master:true,voting_only:false
432
+
# Select nodes by custom attribute
433
+
# (for example, with something like `node.attr.rack: 2` in the configuration file)
0 commit comments