docker-compose部署ELK+skywalking

docker-compose部署ELK+skywalking

使用docker-compose部署elk十分方便简洁,适合单机部署,提供大家学习、开发使用。

docker-compose文件:

version: '3'
services:
  elasticsearch:
    image: elasticsearch:7.7.0
    container_name: elk_elasticsearch
    restart: always
    environment:
      - "cluster.name=elasticsearch" 
      - "discovery.type=single-node" 
      - "ES_JAVA_OPTS=-Xms512m -Xmx1024m" 
    volumes:
      - ./elasticsearch/plugins:/usr/share/elasticsearch/plugins
      - ./elasticsearch/data:/usr/share/elasticsearch/data
    ports:
      - 9200:9200

  kibana:
    image: kibana:7.7.0
    container_name: elk_kibana
    restart: always
    depends_on:
      - elasticsearch
    environment:
      - ELASTICSEARCH_URL=http://elasticsearch:9200
    ports:
      - 5601:5601

  logstash:
    image: logstash:7.7.0
    container_name: elk_logstash
    restart: always
    volumes:
      - ./logstash/logstash-springboot.conf:/usr/share/logstash/pipeline/logstash.conf 
    depends_on:
      - elasticsearch
    links:
      - elasticsearch:es
    ports:
      - 4560:4560

  oap:
    image: apache/skywalking-oap-server
    container_name: skywalking-oap
    depends_on:
        - elasticsearch
    links:
        - elasticsearch
    restart: always
    ports:
        - 11800:11800
        - 12800:12800
    environment:
        TZ: Asia/Shanghai

  ui:
    image: apache/skywalking-ui
    container_name: skywalking-ui
    depends_on:
        - oap
    links:
        - oap
    restart: always
    ports:
        - 8081:8080
    environment:
        collector.ribbon.listOfServers: oap:12800
        security.user.admin.password: 123456

新建挂载目录:

mkdir elasticsearch
mkdir logstash

启动docker-compose:

docker-complse build
docker-complose up -d
Creating network "elk-compose_default" with the default driver
Creating elk_elasticsearch ... done
Creating elk_logstash      ... done
Creating skywalking-oap    ... done
Creating elk_kibana        ... done
Creating skywalking-ui     ... done

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值