ElasticSearch
ElasticSearch is a search engine based on the Lucene library. It provides a distributed, multitenant-capable full-text search engine with an HTTP web interface and schema-free JSON documents.
ElasticSearch has a nice REST API to retrieve all important settings for a running cluster.
Check cluster health
A good start to check on the cluster health is the "/health" endpoint.
curl localhost:9200/_cluster/health?pretty
{
"cluster_name" : "elastic-demo-cluster-us-west-2",
"status" : "green",
"timed_out" : false,
"number_of_nodes" : 68,
"number_of_data_nodes" : 65,
"active_primary_shards" : 16200,
"active_shards" : 32400,
"relocating_shards" : 4,
"initializing_shards" : 0,
"unassigned_shards" : 0,
"delayed_unassigned_shards" : 0,
"number_of_pending_tasks" : 0,
"number_of_in_flight_fetch" : 0,
"task_max_waiting_in_queue_millis" : 0,
"active_shards_percent_as_number" : 100.0
}Configure cluster wide settings
If you want to reboot a machine or do some maintenance it makes sense to delay "index.unassigned.node_left.delayed_timeout" to 10min. Afterwards you can change it back to 30sec. For more details see https://www.elastic.co/guide/en/elasticsearch/reference/current/delayed-allocation.html
Cat Endpoint
Check pending tasks
Check max result size settings
Get list of nodes
Check Cluster settings
Find problematic shards
If nodes crash and leave the cluster the status for the affected shards will change to "NODE_LEFT".
Another reason for problems can be UNASSIGNED_SHARDS. This can happen if the disk watermark has reached a level where no new shards can be assigned to ElasticSearch nodes. This is a good indicator that the cluster needs to be scaled out.
Retrieve more information about shard allocation issues
Decommission a node from ElasticSearch cluster
Last updated