• elk in docker


    version: '3.7'
    services:
      es01:
        image: docker.elastic.co/elasticsearch/elasticsearch:7.2.0
        container_name: es01
        environment:
          - node.name=es01
          - network.host=_site_
          - discovery.seed_hosts=es02
          - cluster.initial_master_nodes=es01,es02
          - cluster.name=docker-cluster
          - bootstrap.memory_lock=true
          - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
        ulimits:
          memlock:
            soft: -1
            hard: -1
        volumes:
          - esdata01:/usr/share/elasticsearch/data
        ports:
          - 9200:9200
        networks:
          - esnet
      es02:
        image: docker.elastic.co/elasticsearch/elasticsearch:7.2.0
        container_name: es02
        environment:
          - node.name=es02
    #      - network.host=_local_
          - discovery.seed_hosts=es01
          - cluster.initial_master_nodes=es01,es02
          - cluster.name=docker-cluster
          - bootstrap.memory_lock=true
          - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
        ulimits:
          memlock:
            soft: -1
            hard: -1
        volumes:
          - esdata02:/usr/share/elasticsearch/data
    #      - /home/wbhhc/docker/elk/config/es02/config:/usr/share/elasticsearch/config
        networks:
          - esnet
      kibana:
        image: docker.elastic.co/kibana/kibana:7.2.0
        container_name: kibana
        volumes:
          - /home/wbhhc/docker/elk/config/kibana/kibana.yml:/usr/share/kibana/config/kibana.yml
        ports:
          - 5601:5601
        networks:
          - esnet
      metricbeat:
        image: docker.elastic.co/beats/metricbeat:7.2.0
        user: root
        container_name: metricbeat
        volumes:
          - /proc:/hostfs/proc:ro
          - /:/hostfs:ro
          - /sys/fs/cgroup:/hostfs/sys/fs/cgroup:ro
          - /var/run/docker.sock:/var/run/docker.sock:ro
          - ~/docker/elk/config/metricbeat/metricbeat.yml:/usr/share/metricbeat/metricbeat.yml:ro
          - ~/docker/elk/config/metricbeat/modules.d/kafka.yml:/usr/share/metricbeat/modules.d/kafka.yml
    #    environment:
    #      - setup.kibana.host=kibana:5601
    #      - output.elasticsearch.hosts=["es01:9200","es02:9200"]
        networks:
          - esnet
      filebeat:
        image: docker.elastic.co/beats/filebeat:7.2.0
        user: root
        container_name: filebeat
        volumes:
          - /var/run/docker.sock:/var/run/docker.sock
          - /var/lib/docker/containers/:/var/lib/docker/containers/:ro
    #      - /var/log/:/var/log/:ro
          - ~/docker/elk/config/filebeat/filebeat.docker.yml:/usr/share/filebeat/filebeat.yml:ro
          - ~/docker/elk/config/filebeat/modules.d:/usr/share/filebeat/modules.d
          - ~/docker/elk/logs:/usr/share/filebeat/logs
          - ~/docker/elk/data:/usr/share/filebeat/data
    
          - ~/docker/elk/logs/kafka:/usr/share/logs/kafka
        environment:
          - BEAT_STRICT_PERMS=false
    #    command: ["--strict.perms=false"]
        networks:
          - esnet
    
      zoo1:
        image: wurstmeister/zookeeper
        container_name: zoo1
        restart: always
        hostname: zoo1
        ports:
          - 2181:2181
        networks:
          - esnet
    
      zkui:
        hostname: zkui
        container_name: zkui
        image: juris/zkui
        restart: always
        environment:
          ZK_SERVER: zoo1:2181
        depends_on:
         - zoo1
    #    links:
    #    #     - zoo1
        ports:
         - 9090:9090
    #             # 账号admin 密码manager
        networks:
         - esnet
      
      kafka:
        image: wurstmeister/kafka
        container_name: kafka
        ports:
         - 9092:9092
        environment:
          KAFKA_ADVERTISED_HOST_NAME: kafka
          KAFKA_ADVERTISED_PORT: 9092
          KAFKA_ZOOKEEPER_CONNECT: zoo1:2181
          KAFKA_BROKER_ID: 1
          KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
          KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:9092
          KAFKA_LISTENERS: PLAINTEXT://kafka:9092
          KAFKA_CREATE_TOPICS: "test:1:1"
        volumes:
         - /var/run/docker.sock:/var/run/docker.sock
         - ~/docker/elk/logs/kafka:/kafka
        depends_on:
         - zoo1
        networks:
         - esnet
      
    
    volumes:
      esdata01:
        driver: local
      esdata02:
        driver: local
    
    networks:
      esnet:

    docker-compose.yml

  • 相关阅读:
    Codeigniter:如何写一个好的Model
    CodeIgniter
    CodeIgniter
    Codeigniter CRUD代码快速构建
    html适配Anroid手机
    使用malloc分别分配2KB,6KB的内存空间,打印指针地址
    大话spring.net之IOC
    Spring2.5学习3.3_@Autowire注解实现手动装配
    OPPO通过AWS节约大量成本提供海外服务
    mysql 父子结构排序
  • 原文地址:https://www.cnblogs.com/13yan/p/13271579.html
Copyright © 2020-2023  润新知