linux:elastic

Differences

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

Link to this comparison view

Next revision
Previous revision
linux:elastic [2021/02/10 15:59] – created adminlinux:elastic [2024/07/14 12:08] (current) – [Elastic Search ELK] admin
Line 1: Line 1:
 ====== Elastic Search ELK ====== ====== Elastic Search ELK ======
   * https://github.com/deviantony/docker-elk - start in compose   * https://github.com/deviantony/docker-elk - start in compose
 +  * https://habr.com/ru/articles/671344/ - elk stack
 +===== ELK.commands1 =====
 +
 +<code BASH>
 +
 +curl 127.0.0.1:9200/_cluster/health?pretty
 +
 +curl 127.0.0.1:9200/_cat/indices?v
 +
 +#get  names of all indicies in red status
 +curl 127.0.0.1:9200/_cluster/health/?level=shards | jq -r '.indices  | to_entries | map(select(.value.status == "yellow")) | .[].key'
 +#get  jsons of all indicies in red status
 +curl 127.0.0.1:9200/_cluster/health/?level=shards | jq -r '.indices  | to_entries | map(select(.value.status == "yellow")) | .[].key'
 +
 +# prepare cmd  for delete indicies in status yellow  for 2021 year 
 +curl 127.0.0.1:9200/_cluster/health/?level=shards | jq -r '.indices  | to_entries | map(select(.value.status == "yellow")) | map(select(.key | test("2021"))) | .[].key'   | sed 's/^/curl -XDELETE 127.0.0.1:9200\//'
 +
 +</code>
 +
  
  • linux/elastic.1612972752.txt.gz
  • Last modified: 2021/02/10 15:59
  • by admin