sfsdf
This commit is contained in:
46
docker/elk/extensions/metricbeat/metricbeat-compose.yml
Executable file
46
docker/elk/extensions/metricbeat/metricbeat-compose.yml
Executable file
@@ -0,0 +1,46 @@
|
||||
version: '3.2'
|
||||
|
||||
services:
|
||||
metricbeat:
|
||||
build:
|
||||
context: extensions/metricbeat/
|
||||
args:
|
||||
ELK_VERSION: $ELK_VERSION
|
||||
# Run as 'root' instead of 'metricbeat' (uid 1000) to allow reading
|
||||
# 'docker.sock' and the host's filesystem.
|
||||
user: root
|
||||
command:
|
||||
# Log to stderr.
|
||||
- -e
|
||||
# Disable config file permissions checks. Allows mounting
|
||||
# 'config/metricbeat.yml' even if it's not owned by root.
|
||||
# see: https://www.elastic.co/guide/en/beats/libbeat/current/config-file-permissions.html
|
||||
- --strict.perms=false
|
||||
# Mount point of the host’s filesystem. Required to monitor the host
|
||||
# from within a container.
|
||||
- --system.hostfs=/hostfs
|
||||
volumes:
|
||||
- type: bind
|
||||
source: ./extensions/metricbeat/config/metricbeat.yml
|
||||
target: /usr/share/metricbeat/metricbeat.yml
|
||||
read_only: true
|
||||
- type: bind
|
||||
source: /
|
||||
target: /hostfs
|
||||
read_only: true
|
||||
- type: bind
|
||||
source: /sys/fs/cgroup
|
||||
target: /hostfs/sys/fs/cgroup
|
||||
read_only: true
|
||||
- type: bind
|
||||
source: /proc
|
||||
target: /hostfs/proc
|
||||
read_only: true
|
||||
- type: bind
|
||||
source: /var/run/docker.sock
|
||||
target: /var/run/docker.sock
|
||||
read_only: true
|
||||
networks:
|
||||
- elk
|
||||
depends_on:
|
||||
- elasticsearch
|
||||
Reference in New Issue
Block a user