elasticsearch 7.2 集群節點配置


conf/elasticsearch.yml對其修改,在下面添加修改:

主節點的配置

http.cors.enabled: true
http.cors.allow-origin: "*"
cluster.name: cluster1
node.name: slave
node.master: true
network.host: 127.0.0.1

配置第二個節點

cluster.name: cluster1
node.name: slave1
network.host: 127.0.0.1
http.port: 8200

配置第三個節點

cluster.name: cluster1
node.name: slave2
network.host: 127.0.0.1
http.port: 7200
discovery.zen.ping.unicast.hosts: ["127.0.0.1"]

 常用查詢命令:

查看集群進程狀態:

curl -u elastic:{password} -X GET "172.18.54.20:9200/_nodes/stats/process?pretty"

檢查集群狀態:
curl -u elastic:{password} -X GET "172.18.54.20:9200/_nodes/stats?pretty"

查看ES集群健康狀態
curl -u elastic:{password} -X GET "172.18.54.20:9200/_cluster/health?pretty"

curl -u elastic:{password} -X GET "172.18.54.20:9200/_cluster/health?level=indices"

查看指定索引庫的健康狀態
curl -u elastic:{password} -X GET "172.18.54.20:9200/_cluster/health/{indexName}?pretty"


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM