赞
踩
Docker-compose安装ELK(单节点)
version: "3" services: elasticsearch: image: elasticsearch:8.5.3 container_name: elasticsearch8.5.3 environment: ES_JAVA_OPTS: -Xms1024m -Xmx1024m discovery.type: single-node volumes: - ./elasticsearch/config/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml:ro - ./elasticsearch/config/log4j2.properties:/usr/share/elasticsearch/config/log4j2.properties:ro - ./elasticsearch/data:/usr/share/elasticsearch/data - ./elasticsearch/logs:/usr/share/elasticsearch/logs ports: - "9200:9200" - "9300:9300" networks: - elk_853 logstash: image: logstash:8.5.3 container_name: logstash8.5.3 environment: ES_JAVA_OPTS: -Xms512m -Xmx512m volumes: - ./logstash/config/logstash.yml:/usr/share/logstash/config/logstash.yml:ro - ./logstash/pipeline:/usr/share/logstash/pipeline:ro - ./logstash/config/log4j2.properties:/usr/share/logstash/config/log4j2.properties:ro ports: - "5000:5000" - "5002:5002" - "5004:5004" - "5006:5006" networks: - elk_853 depends_on: - elasticsearch kibana: image: kibana:8.5.3 container_name: kibana8.5.3 volumes: - ./kibana/config/kibana.yml:/usr/share/kibana/config/kibana.yml:ro ports: - "5601:5601" networks: - elk_853 depends_on: - elasticsearch networks: elk_853: #docker cp b24aa7e3fc1f:/usr/share/elasticsearch/config/elasticsearch.yml ./elasticsearch/config/temp #docker cp f957ac9ec5d3:/usr/share/elasticsearch/config/log4j2.properties ./elasticsearch/config #docker cp f957ac9ec5d3:/usr/share/elasticsearch/data ./elasticsearch #docker cp f957ac9ec5d3:/usr/share/elasticsearch/logs ./elasticsearch # # #docker cp 46bc11d3aa29:/usr/share/kibana/config/kibana.yml ./kibana/config # #docker cp 6e4595283e83:/usr/share/logstash/config/logstash.yml ./logstash/config #docker cp 6e4595283e83:/usr/share/logstash/pipeline ./logstash #docker cp 6e4595283e83:/usr/share/logstash/config/log4j2.properties ./logstash/config
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。