elasticsearch5.4.3、kibana分布式安装

设置elasticsearch

两台机器:

master ip 192.168.31.106

slave ip 192.168.31.162

master  elasticsearch.yml

bootstrap.memory_lock: false
bootstrap.system_call_filter: false

node.name: node-1
node.master: true
node.data: true
network.bind_host: 192.168.31.106
network.publish_host: 192.168.1.106
network.host: 0.0.0.0
http.max_content_length: 1024mb
discovery.zen.ping.unicast.hosts: ["192.168.31.162"]
http.cors.enabled: true
http.cors.allow-origin: "*"
discovery.zen.ping_timeout: 10s
discovery.zen.minimum_master_nodes: 2
discovery.zen.fd.ping_timeout: 10000s
discovery.zen.fd.ping_retries: 10

The discovery.zen.ping_timeout (which defaults to 3s) determines how long the node will wait before deciding on starting an election or joining an existing cluster. 

discovery.zen.fd:

ping_timeout

How long to wait for a ping response, defaults to 30s.

 

ES在大量插入数据时会产生gc overhead 错误,在gc overhead 过程中会进入stop-the-world状态,导致ping不通,因此调整ping的时间长度

slave elasticsearch.yml

bootstrap.memory_lock: false
bootstrap.system_call_filter: false

node.name: node-2
node.master: true
node.data: true
network.bind_host: 192.168.31.162
network.publish_host: 192.168.1.162
network.host: 0.0.0.0
http.max_content_length: 1024mb
discovery.zen.ping.unicast.hosts: ["192.168.31.106"]
http.cors.enabled: true
http.cors.allow-origin: "*"
discovery.zen.ping_timeout: 10s
discovery.zen.minimum_master_nodes: 2
discovery.zen.fd.ping_timeout: 10000s
discovery.zen.fd.ping_retries: 10

设置node.master: true ,两台机器哪个先启动,哪个就是master。

设置kibana

server.host: "0.0.0.0"
elasticsearch.url: "http://192.168.1.162:9200"

设置ElasticSearh-head

下载elasticsearch-head

cd /path/to/elasticsearch-head
npm install -g grunt-cli
npm install
grunt server
http://localhost:9100/
 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值