elasticsearch
                Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| elasticsearch [2018/01/18 17:03] – [Elasticsearch] k2patel | elasticsearch [2021/01/25 23:41] (current) – [Quick Commands] k2patel | ||
|---|---|---|---|
| Line 7: | Line 7: | ||
| </ | </ | ||
| - | == Node Information | + | == List all Indexes | 
| <code bash> | <code bash> | ||
| - | curl -XGET ' | + | curl http:// | 
| + | </ | ||
| + | |||
| + | == List all shards == | ||
| + | <code bash> | ||
| + | curl -XGET ' | ||
| + | </ | ||
| + | |||
| + | == Unassigned shard | timeout == | ||
| + | **Try restarting** | ||
| + | <code bash> | ||
| + | curl -XPOST -k https:// | ||
| + | </ | ||
| + | **List indexes not assigned** | ||
| + | <code bash> | ||
| + | curl -k --CApath / | ||
| + | </ | ||
| + | **Detailed information on issue** | ||
| + | <code bash> | ||
| + | curl -k --CApath / | ||
| + | </ | ||
| + | |||
| + | == Detailed Shard Information == | ||
| + | <code bash> | ||
| + | curl -XGET ' | ||
| + | </ | ||
| + | |||
| + | == Delete indexes == | ||
| + | <code bash> | ||
| + | curl -XDELETE ' | ||
| + | </ | ||
| + | |||
| + | == Disk usage issue == | ||
| + | When free disk space fall cluster fails. | ||
| + | <code bash> | ||
| + | curl -H ' | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | } | ||
| + | }' http:// | ||
| </ | </ | ||
| Line 15: | Line 56: | ||
| ==== Templates ==== | ==== Templates ==== | ||
| + | === Filebeat Template apache2 module === | ||
| + | <code json> | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | }, | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | } | ||
| + | } | ||
| + | }, | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | } | ||
| + | } | ||
| + | } | ||
| + | } | ||
| + | } | ||
| + | ], | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | }, | ||
| + | " | ||
| + | " | ||
| + | }, | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | }, | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | }, | ||
| + | " | ||
| + | " | ||
| + | }, | ||
| + | " | ||
| + | " | ||
| + | }, | ||
| + | " | ||
| + | " | ||
| + | } | ||
| + | } | ||
| + | } | ||
| + | } | ||
| + | } | ||
| + | } | ||
| + | } | ||
| + | </ | ||
| ==== Errors ==== | ==== Errors ==== | ||
| Line 32: | Line 146: | ||
| } | } | ||
| }' | }' | ||
| + | </ | ||
| + | |||
| + | ==== Rolling Upgrade ==== | ||
| + | :!: This should work on elastic.co but my steps are mainly taken from the Opendistro. | ||
| + | |||
| + | === Set the cluster in upgrade mode === | ||
| + | <code bash> | ||
| + | curl -k -XPOST https:// | ||
| + | </ | ||
| + | |||
| + | === Disable sharding === | ||
| + | <code bash> | ||
| + | curl -k -H ' | ||
| + | " | ||
| + | " | ||
| + | } | ||
| + | }' https:// | ||
| + | </ | ||
| + | |||
| + | === Flush / Sync data on all host in cluster === | ||
| + | <code bash> | ||
| + | curl -k -XPOST https:// | ||
| + | </ | ||
| + | |||
| + | === Stop / Upgrade / start Services === | ||
| + | <code bash> | ||
| + | systemctl stop kibana.service | ||
| + | systemctl stop elasticsearch.service | ||
| + | dnf install opendistroforelasticsearch-1.12.0 -y | ||
| + | dnf install opendistroforelasticsearch-kibana-1.12.0 -y | ||
| + | systemctl start elasticsearch.service | ||
| + | systemctl start kibana.service | ||
| + | </ | ||
| + | |||
| + | === Enable Sharding === | ||
| + | <code bash> | ||
| + | curl -k -H ' | ||
| + | " | ||
| + | " | ||
| + | } | ||
| + | }' https:// | ||
| + | </ | ||
| + | |||
| + | ==== Node Information ==== | ||
| + | === List all nodes and important information === | ||
| + | : | ||
| + | <code bash> | ||
| + | curl -XGET -k https:// | ||
| </ | </ | ||
elasticsearch.1516295024.txt.gz · Last modified: 2020/08/10 02:28 (external edit)
                
                