version: '2' services: kibana: image: kibana:5 restart: unless-stopped ports: - "5601:5601" depends_on: - elasticsearch environment: - ELASTICSEARCH_URL=http://elasticsearch:9200 elasticsearch: image: elasticsearch:5-alpine ports: - "9200:9200" restart: unless-stopped command: elasticsearch -Etransport.host=127.0.0.1 environment: - "ES_JAVA_OPTS=-Xms512m -Xmx512m" metricbeat: build: . restart: unless-stopped pid: host network_mode: host volumes: - /proc:/hostfs/proc:ro - /sys/fs/cgroup:/hostfs/sys/fs/cgroup:ro - /:/hostfs:ro - ./metricbeat.yml:/metricbeat/metricbeat.yml depends_on: - elasticsearch environment: - ELASTICSEARCH_URL=http://localhost:9200 command: - "-system.hostfs=/hostfs"