ElasticSearch - Useful commands
Below is a list of command that may / may not help for running / troubleshooting your elasticsearch cluster.
replace localhost with the ip address of your elasticsearch hosts if its not listening on localhost.
ClusterHealth
curl -XGET 'http://localhost:9200/_cluster/health?pretty'
Delete an Index
curl -XDELETE 'localhost:9200/index_name*?pretty' -d '
{
"acknowledged" : true
}
Find unassigned shards
replace localhost with the ip address of your elasticsearch hosts if its not listening on localhost.
ClusterHealth
curl -XGET 'http://localhost:9200/_cluster/health?pretty'
Delete an Index
curl -XDELETE 'localhost:9200/index_name*?pretty' -d '
{
"acknowledged" : true
}
Find unassigned shards
curl -XGET localhost:9200/_cat/shards?h=index,shard,prirep,state,\
unassigned.reason| grep UNASSIGNED
I'll add more as and when I come across them.
Comments
Post a Comment