节点状态相关

  1. 检查节点是否运行

    1
    curl -XGET http://localhost:9200
  2. 检查节点健康状态

    1
    curl -XGET http://localhost:9200/_cluster/health\?pretty
  3. 检查群集节点状态

    1
    curl -XGET http://192.168.248.148:9200/_cat/nodes?v

分片状态相关

  1. 检查分片健康
    1
    curl http://localhost:9200/_cat/indices
  2. 检查所有分片
    1
    curl -XGET http://localhost:9200/_cat/shards
  3. 删除分片
    1
    curl -XDELETE http://127.0.0.1:9200/wazuh-alerts-3.x-2021.05.16
  4. 设置分片数
    1
    curl -XPUT  "127.0.0.1:9200/_cluster/settings" -H 'Content-Type: application/json' -d '{"transient":{"cluster":{"max_shards_per_node":20000}}}'

存储相关

  1. 设置存储水位
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    curl -X PUT "http://127.0.0.1:9200/_cluster/settings" -H 'Content-Type: application/json' -d'

    {

    "persistent": {

    "cluster.routing.allocation.disk.watermark.low":"90%"

    }

    }
    '