Elasticsearch 6.5 集群配置 详解

环境信息

ES版本 6.5

系统信息

CentOS Linux release 7.6.1810 (Core)

主机

主机 ip
elasticsearch-1 172.20.0.173
elasticsearch-2 172.20.0.171

 

 

 

 

配置文件

## 集群名称 各节点统一
cluster.name: wlwx-cluster-01
## 节点名称
node.name: elasticsearch-1
## 数据和日志存放路径
path.data: /DATA/elasticsearch/esdata/
path.logs: /DATA/elasticsearch/eslogs/
## 锁定物理内存地址,防止es内存被交换出去 ,需要配置ulimit参数参考前一篇安装文档
bootstrap.memory_lock: true
## 启动进行系统检测
bootstrap.system_call_filter: false
## 绑定IP地址
network.host: 0.0.0.0
http.port: 9200
## 节点间交互的tcp 端口
transport.tcp.port: 9300
## 备用master节点
discovery.zen.ping.unicast.hosts: ["172.20.0.173", "172.20.0.171"]
## 集群节点quorum数量,quorum =master候选节点/2+1 2节点配置2错误,1可能会脑裂,建议最少3节点
discovery.zen.minimum_master_nodes: 1
## 是否支持跨域 和允许的域范围,默认为* 所有,可用正则匹配
http.cors.enabled: true
http.cors.allow-origin: "*"
## 禁用xpack安全机制
xpack.security.enabled: false
## 是否开启监控
xpack.monitoring.enabled: true
## 收集集群统计信息的超时。默认为10s
xpack.monitoring.collection.cluster.stats.timeout: 10s
## index 缓冲区大小 
indices.memory.index_buffer_size: 20%
## 传输流量最大值
indices.recovery.max_bytes_per_sec: 10000mb
## 节点fielddata 的最大内存,达到则交换旧数据,建议设置小一点
indices.fielddata.cache.size: 10%
## fielddata限制大小,一定要大于cache 大小
indices.breaker.fielddata.limit: 60%
## request数量使用内存限制,默认为JVM堆的40%
indices.breaker.request.limit: 60%
所有breaker使用的内存值,默认值为 JVM 堆内存的70%,当内存达到最高值时会触发内存回收
indices.breaker.total.limit: 80%
## 动作自动创建索引
action.auto_create_index: true
cluster.name: wlwx-cluster-01
node.name: elasticsearch-2
path.data: /DATA/elasticsearch/esdata/
path.logs: /DATA/elasticsearch/eslogs/
bootstrap.memory_lock: true
bootstrap.system_call_filter: false
network.host: 0.0.0.0
http.port: 9200
transport.tcp.port: 9300
discovery.zen.ping.unicast.hosts: ["172.20.0.173:9300", "172.20.0.171:9300"]
discovery.zen.minimum_master_nodes: 1
http.cors.enabled: true
http.cors.allow-origin: "*"
xpack.security.enabled: false
xpack.monitoring.enabled: true
xpack.monitoring.collection.cluster.stats.timeout: 10s
indices.memory.index_buffer_size: 20%
indices.recovery.max_bytes_per_sec: 10000mb
indices.fielddata.cache.size: 10%
indices.breaker.fielddata.limit: 60%
indices.breaker.request.limit: 60%
indices.breaker.total.limit: 80%
action.auto_create_index: true

用elasticsearch-head 工具查看

Elasticsearch 6.5 集群配置 详解_第1张图片

你可能感兴趣的:(ELK)