forked from shazChaudhry/docker-elastic
-
Notifications
You must be signed in to change notification settings - Fork 0
/
metricbeat-docker-compose.yml
42 lines (37 loc) · 1.17 KB
/
metricbeat-docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
version: "3.8"
services:
metricbeat:
image: docker.elastic.co/beats/metricbeat:${ELASTIC_VERSION:-7.9.1}
# https://github.com/docker/swarmkit/issues/1951
hostname: "{{.Node.Hostname}}-metricbeat"
user: root
networks:
- elastic
configs:
- source: mb_config
target: /usr/share/metricbeat/metricbeat.yml
volumes:
- /proc:/hostfs/proc:ro
- /sys/fs/cgroup:/hostfs/sys/fs/cgroup:ro
- /:/hostfs:ro
- /var/run/docker.sock:/var/run/docker.sock
- metricbeat:/usr/share/metricbeat/data
environment:
- ELASTICSEARCH_HOST=${ELASTICSEARCH_HOST:-node1}
- KIBANA_HOST=${KIBANA_HOST:-node1}
- ELASTICSEARCH_USERNAME=${ELASTICSEARCH_USERNAME:-elastic}
- ELASTICSEARCH_PASSWORD=${ELASTICSEARCH_PASSWORD:-changeme}
# disable strict permission checks
command: ["--strict.perms=false", "-system.hostfs=/hostfs"]
deploy:
mode: global
networks:
elastic:
external: true
# https://www.elastic.co/guide/en/beats/metricbeat/current/running-on-docker.html#monitoring-host
name: host
volumes:
metricbeat:
configs:
mb_config:
file: $PWD/elk/beats/metricbeat/config/metricbeat.yml