49 lines
1.3 KiB
Plaintext
49 lines
1.3 KiB
Plaintext
[[cluster-state]]
|
|
== Cluster State
|
|
|
|
The cluster state API allows to get a comprehensive state information of
|
|
the whole cluster.
|
|
|
|
[source,js]
|
|
--------------------------------------------------
|
|
$ curl -XGET 'http://localhost:9200/_cluster/state'
|
|
--------------------------------------------------
|
|
|
|
By default, the cluster state request is routed to the master node, to
|
|
ensure that the latest cluster state is returned.
|
|
For debugging purposes, you can retrieve the cluster state local to a
|
|
particular node by adding `local=true` to the query string.
|
|
|
|
[float]
|
|
=== Response Filters
|
|
|
|
It is possible to filter the cluster state response using the following
|
|
REST parameters:
|
|
|
|
`filter_nodes`::
|
|
Set to `true` to filter out the `nodes` part of the
|
|
response.
|
|
|
|
`filter_routing_table`::
|
|
Set to `true` to filter out the `routing_table`
|
|
part of the response.
|
|
|
|
`filter_metadata`::
|
|
Set to `true` to filter out the `metadata` part of the
|
|
response.
|
|
|
|
`filter_blocks`::
|
|
Set to `true` to filter out the `blocks` part of the
|
|
response.
|
|
|
|
`filter_indices`::
|
|
When not filtering metadata, a comma separated list of
|
|
indices to include in the response.
|
|
|
|
Example follows:
|
|
|
|
[source,js]
|
|
--------------------------------------------------
|
|
$ curl -XGET 'http://localhost:9200/_cluster/state?filter_nodes=true'
|
|
--------------------------------------------------
|