ELK 5.6版本已经非常老了,最新的EFK7.6版本功能不仅强化了日志查询功能还增加的应用性能监控功能。下面将介绍怎样搭建EFK7.6
compose编排文件如下
version: '2'
services:
kibana:
image: kibana:7.6.2
network_mode: host
environment:
ELASTICSEARCH_HOSTS: http://127.0.0.1:9200
elastic:
image: elasticsearch:7.6.2
network_mode: host
ports:
- '9200:9200'
- '9300:9300'
user: "101"
volumes:
- /srv/elk/es1.yml:/usr/share/elasticsearch/config/elasticsearch.yml
- /srv/elk/esdata7:/usr/share/elasticsearch/data
- /usr/share/zoneinfo/Asia/Shanghai:/etc/localtime
/srv/elk/es1.yml文件内容如下
cluster.name: elasticsearch-cluster
node.name: node1
network.bind_host: 0.0.0.0
network.publish_host: 101.71.88.66
http.port: 9200
#cluster.initial_master_nodes: ["node-1"]
discovery.type: single-node
#transport.tcp.port: 9300
#http.cors.enabled: true
#http.cors.allow-origin: "*"
#node.master: true
#node.data: true
#discovery.zen.ping.unicast.hosts: ["192.168.9.219:9300","192.168.9.219:9301","192.168.9.219:9302"]
#discovery.zen.minimum_master_nodes: 2
xpack.license.self_generated.type: basic
xpack.security.enabled: false
xpack.security.transport.ssl.enabled: false
创建文件夹并设置权限
mkdir /srv/elk/esdata7
chown 101:101 /srv/elk/esdata7
网友评论