节点状态相关

  1. 检查节点是否运行

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

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

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

    分片状态相关

  4. 检查分片健康

    curl http://localhost:9200/_cat/indices
  5. 检查所有分片

    curl -XGET http://localhost:9200/_cat/shards
  6. 删除分片

    curl -XDELETE http://127.0.0.1:9200/wazuh-alerts-3.x-2021.05.16
  7. 设置分片数

    curl -XPUT  "127.0.0.1:9200/_cluster/settings" -H 'Content-Type: application/json' -d '{"transient":{"cluster":{"max_shards_per_node":20000}}}'

存储相关

  1. 设置存储水位
    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%"
    
     }
    
    }   
    '