User Tools

Site Tools


elasticsearch

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
elasticsearch [2021/01/25 23:32]
k2patel
elasticsearch [2021/01/25 23:41] (current)
k2patel [Quick Commands]
Line 5: Line 5:
 <code bash> <code bash>
 curl -XGET '​http://​localhost:​9200/​_cluster/​health?​pretty=true'​ curl -XGET '​http://​localhost:​9200/​_cluster/​health?​pretty=true'​
-</​code>​ 
- 
-== Node Information == 
-<code bash> 
-curl -XGET '​http://​localhost:​9200/​_nodes?​pretty=true'​ 
 </​code>​ </​code>​
  
Line 20: Line 15:
 <code bash> <code bash>
 curl -XGET '​http://​localhost:​9200/​_cat/​shards'​ curl -XGET '​http://​localhost:​9200/​_cat/​shards'​
 +</​code>​
 +
 +== Unassigned shard | timeout ==
 +**Try restarting**
 +<code bash>
 +curl -XPOST -k https://​admin:<​password>​@<​hostname>:​9200/​_cluster/​reroute?​retry_failed=true --CApath /​etc/​elasticsearch/​root-ca-key.pem
 +</​code>​
 +**List indexes not assigned**
 +<code bash>
 +curl -k --CApath /​etc/​elasticsearch/​root-ca-key.pem -XGET https://​admin:<​password>​@<​hostname>:​9200/​_cat/​shards?​h=index,​shard,​prirep,​state,​unassigned.reason | grep -i UNASSIGNED
 +</​code>​
 +**Detailed information on issue**
 +<code bash>
 +curl -k --CApath /​etc/​elasticsearch/​root-ca-key.pem -XGET https://​admin:<​password>​@<​hostname>:​9200/​_cluster/​allocation/​explain?​pretty
 </​code>​ </​code>​
  
Line 31: Line 40:
 curl -XDELETE '​http://​localhost:​9200/​*.reindex'​ curl -XDELETE '​http://​localhost:​9200/​*.reindex'​
 </​code>​ </​code>​
 +
 +== Disk usage issue ==
 +When free disk space fall cluster fails.
 +<code bash>
 +curl -H '​Content-Type:​ application/​json'​ -X PUT -d '{
 +  "​transient":​ {
 +    "​cluster.routing.allocation.disk.watermark.low":​ "​89%",​
 +    "​cluster.routing.allocation.disk.watermark.high":​ "​94%",​
 +   "​cluster.info.update.interval":​ "​1m"​
 +  }
 +}' http://​localhost:​9200/​_cluster/​settings
 +</​code>​
 +
 +
 ==== Templates ==== ==== Templates ====
  
elasticsearch.1611617520.txt.gz ยท Last modified: 2021/01/25 23:32 by k2patel