Elasticsearch - Cluster APIs - elasticsearch - elasticsearch tutorial - elastic search
Elasticsearch Cluster APIs
- Most cluster level APIs allow to specify which nodes to execute on (for example, getting the node stats for a node).
- Nodes can be identified in the APIs either using their internal node id, the node name, address, custom attributes, or just the _local node receiving the request.
learn elasticsearch tutorials - node cluster Example
For example:
elasticsearch - elasticsearch tutorial - elastic search - elasticsearch sort - elasticsearch list indexes - elasticsearch node
Response
Or
Response
- Same as in the above example.
Cluster Health
- This API is used to get the status on the health of the cluster by appending health keyword.
For example:
elasticsearch - elasticsearch tutorial - elastic search - elasticsearch sort - elasticsearch list indexes - elasticsearch node
Response
Cluster State
- This API is used to get state information about a cluster by appending ‘state’ keyword URL.
- The state information contains version, master node, other nodes, routing table, metadata and blocks.
learn elasticsearch tutorials - elasticsearch clusters indexers Example
For example:
elasticsearch - elasticsearch tutorial - elastic search - elasticsearch sort - elasticsearch list indexes - elasticsearch node
Response
Cluster Stats
- This API helps to retrieve statistics about cluster by using ‘stats’ keyword.
- This API returns shard number, store size, memory usage, number of nodes, roles, OS, and file system.
For example:
elasticsearch - elasticsearch tutorial - elastic search - elasticsearch sort - elasticsearch list indexes - elasticsearch node
Response
Pending Cluster Tasks
- This API is used for monitoring pending tasks in any cluster.
- Tasks are like create index, update mapping, allocate shard, fail shard etc.
elasticsearch - elasticsearch tutorial - elastic search - elasticsearch sort - elasticsearch list indexes - elasticsearch node
For example:
Cluster Reroute
- This API is used for moving shard from one node to another or to cancel any allocation or allocate any unassigned shard.
For example:
Request Body
Cluster Update Settings
- This API allows you to update the settings of a cluster by using settings keyword.
- There are two types of settings - persistent (applied across restarts) and transient (do not survive a full cluster restart).
Cluster APIs: Node specification
- Most cluster level APIs allow to specify which nodes to execute on (for example, getting the node stats for a node).
- Nodes can be identified in the APIs either using their internal node id, the node name, address, custom attributes, or just the _local node receiving the request.
- For example, here are some sample executions of nodes info:
Node Stats
- This API is used to retrieve the statistics of one more nodes of the cluster.
- Node stats are almost the same as cluster.
elasticsearch - elasticsearch tutorial - elastic search - elasticsearch sort - elasticsearch list indexes - elasticsearch node
For example:
Response
elasticsearch - elasticsearch tutorial - elastic search - elasticsearch sort - elasticsearch list indexes - elasticsearch node
Nodes hot_threads
- This API helps you to retrieve information about the current hot threads on each node in cluster.