Elasticsearch curl commands and references

A collection of Elasticsearch curl commands and references. Get Cluster Health cluster health: curl -s http://localhost:9200/_cluster/health?pretty Get indices indices: curl -s http://localhost:9200/_cat/indices Get shards shards: curl -s http://localhost:9200/_cat/shards Stuck Unassigned Shards Sometimes shards fail to assign and they hit a maximum retry. For example, say there’s a replica shard that is unassigned and won’t assign. Running this command has it retry: curl -s -XPOST 'localhost:9200/_cluster/reroute?retry_failed' -H 'Content-Type: application/json' -d' { "commands" : [ { "allocate_replica" : { "index" : "INDEXNAME", "shard" : 0, "node" : "NODENAME" } } ] } ' In the above example, INDEXNAME is the index, NODENAME is the node.

adventures in stunnel and elasticsearch

While deploying a 3 node HIPAA compliant Elasticsearch/Kibana cluster, we ran into a really weird issue where the nodes would disconnect/reconnect, every 12 hours or so. This includes TCP analysis of the connectivity issues, a glimpse into Elasticsearch node TCP connectivity and TCP keepalive settings, discovery of the root cause, and resolution of the connectivity issue. Background We deployed a “secure 3 node cluster”, one that used TLS everywhere; on the inbound elasticsearch clients, between nodes, in front of Kibana.