List some common Elasticsearch APIs to check different objects:
Elastic Stack Compatibility
The table shows the stack components’ version compatibility.
Some Strategies
-
If the cluster is unhealthy, check health API the shard status, as well as check node API for node status, are all nodes in good roles? Also check path.data in date node. Check this post
-
If remove and rejoin node intentionally in a short time, e.g: upgrade, OS maintenance, etc, can delay the unassigned replica shards re-allocation. This setting goes into every index so it may take some time, you can revert setting back after node rejoins.
Cluster Check
1 | # cluster health, examine: |
Pending Task
1 | # pending tasks list |
Node Check
1 | curl -s "http://localhost:9200/_cat/nodes?pretty" |
Index Check
Delete indices can be performed on Kibana Index Management browser.
1 | # list all header parameters |
Index Template
1 | # cat |
Index Alias
1 | # get index alias |
Shard Check
1 | # list primary/replic shards of specific index |
Data Stream
It is easy to examine DS in Kibana index management console.
1 | # get specificed ds backing indices, template, ILM |
What I care about is the current write index of DS:
1 | # list of all non-system, non-hidden data stream |
Another important statistics is the distribution of data stream based hot shard, it is not straightforward and needs some calculation, I have wrote a script to display it.
ILM
The index lifecycle management APIs. I have observed the huge number of pending tasks from ILM operations that slow down the cluster holistically (cs, traffic, usage, etc)
1 | # examine shard age and phase state |
Stop and start the ILM system, used when performing schedule maintenance on cluster nodes and cloud impact ILM actions.
1 | # check status |