Skip to content

Instantly share code, notes, and snippets.

@codersofthedark
Last active December 16, 2019 23:10
Show Gist options
  • Save codersofthedark/500159e5f0736e2a9dbc2198cddec62c to your computer and use it in GitHub Desktop.
Save codersofthedark/500159e5f0736e2a9dbc2198cddec62c to your computer and use it in GitHub Desktop.
Handy Commands of ES which scaling / replacing nodes in a cluster
HEALTH: curl 127.0.0.1:9200/_cluster/health?pretty
HEALTH DETAIL: curl 127.0.0.1:9200/_cluster/allocation/explain?pretty
DELETE INDEX: curl -X DELETE "localhost:9200/twitter?pretty"
EXCLUDE NODE:
curl -XPUT localhost:9200/_cluster/settings -H 'Content-Type: application/json' -d '{
"transient" :{
"cluster.routing.allocation.exclude._name" : "esdata-021d11eee16"
}
}';
INCREASE CONCURRENT RECOVERY:
curl -XPUT localhost:9200/_cluster/settings -d '{
"transient" :{
"cluster.routing.allocation.node_concurrent_recoveries" : 300
}
}';echo
INCRESE PACKET SIZE:
curl -XPUT localhost:9200/_cluster/settings -d '{"transient" :{"indices.recovery.max_bytes_per_sec" : "900mb"}}';echo
REFERENCES:
https://docs.oracle.com/cd/E91187_01/pt855pbr2/eng/pt/tpst/task_RemovingANodeFromACluster.html?pli=ul_d73e43_tpst
https://discuss.elastic.co/t/cluster-routing-allocation-exclude-name-not-working/160620
https://logz.io/blog/elasticsearch-cheat-sheet/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment