通过curl 查看es和调整配置

调整集群的日志级别

curl -X PUT http://192.168.0.10:9201/_cluster/settings -H 'Content-Type: application/json' -d @debug.json
#调整到trace级别,下面是debug.json内容
{
"transient": {
"logger.org.elasticsearch.transport": "TRACE"
}
}

查看集群的setting

curl http://192.168.0.10:9201/_cluster/settings\?pretty

调整索引副本数

curl -X PUT http://192.168.0.10:9201/_settings -H 'Content-Type: application/json' -d '{"index":{"number_of_replicas":"0"}}'
#将索引的副本调整为0,这里是对所有索引生效

查看每个索引的settings

 curl http://192.168.0.10:9201/_settings\?pretty

查看集群的健康情况

curl http://192.168.0.10:9201/_cluster/health\?pretty
posted on 2022-09-08 14:20  每天进步一点点点点点  阅读(1204)  评论(0)    收藏  举报