Useful Elastic command
Remove Mac gatekeeper signature from .tar download
xattr -r -d com.apple.quarantine <elastic-path>
Extract kibana and ES .tar archives
tar -xvf <path>
Reset elastic
user password
bin/elasticsearch-reset-password -u elastic
Generate new Kibana token
bin/elasticsearch-create-enrollment-token --scope kibana
Generate new Node token
This is useful for when spinning up new nodes in our cluster.
bin/elasticsearch-create-enrollment-token --scope node
Know why shards are unassigned
GET /_cluster/allocation/explain
Check shard health
GET /_cat/shards?v&index=*,-.*,-.internal.*,-.*default*
You will see doc distribution across shards in the response: