Elasticsearch7.x配置文件
前言:
以下配置文件基于elasticsearch-7.13.4版本,当然也适用于其它7.x版本
集群环境:
部署3个节点的集群,各个节点不做角色区分,既是master,也是data,在性能 上这种方式的集群,不如单一角色集群性能高。
集群名称:escluster101
httpport:9201
transport: 9301
node.name : es_{ip}_{httpport}
开启xpact权限,有证书认证
配置文件:elasticsearch.yml
cluster.name: escluster101
node.name: es_192.168.10.101_9201
path.data: /work/data4/escluster101/es9201/data
path.logs: /work/data4/escluster101/es9201/logs
bootstrap.memory_lock: true
network.host: 192.168.10.101
http.port: 9201
transport.port: 9301
discovery.seed_hosts: ["192.168.10.102:9301", "192.168.10.101:9301", "192.168.10.103:9301"]
cluster.initial_master_nodes: ["es_192.168.10.102_9201", "es_192.168.10.101_9201", "es_192.168.10.103_9201"]
xpack.monitoring.enabled: true
xpack.monitoring.collection.enabled: true
xpack.watcher.enabled: true
xpack.graph.enabled: true
xpack.ml.enabled: false
xpack.security.enabled: true
xpack.security.transport.ssl.enabled: true
xpack.security.transport.ssl.verification_mode: certificate
xpack.security.transport.ssl.keystore.path: certs/elastic-certificates.p12
xpack.security.transport.ssl.truststore.path: certs/elastic-certificates.p12
cluster.routing.allocation.same_shard.host: true
需要注意:
cluster.initial_master_nodes 这个参数,在集群初始启动时,读取该参数内容;集群正常启动之后,就不依赖该参数了。 后续集群重启或者新节点加入也不会使用该配置
参考官方文档:
远方不一定有诗,但有更好的自己!你我共勉!