fix(metricbeat): Enable SYS_PTRACE, use host cgroup ns

Closes #1087
This commit is contained in:
Antoine Cotten
2025-07-22 23:20:20 +02:00
parent c8e4e16bc5
commit 660d1b5ae6

View File

@@ -7,6 +7,13 @@ services:
# Run as 'root' instead of 'metricbeat' (uid 1000) to allow reading # Run as 'root' instead of 'metricbeat' (uid 1000) to allow reading
# 'docker.sock' and the host's filesystem. # 'docker.sock' and the host's filesystem.
user: root user: root
# If AppArmor or SELinux are enabled on the host, some permissions may be
# denied unless the container is running with escalated privileges.
# Use with extreme care.
#privileged: true
cap_add:
# Allows collecting I/O metrics for host processes.
- SYS_PTRACE
command: command:
# Log to stderr. # Log to stderr.
- -e - -e
@@ -39,6 +46,7 @@ services:
METRICBEAT_INTERNAL_PASSWORD: ${METRICBEAT_INTERNAL_PASSWORD:-} METRICBEAT_INTERNAL_PASSWORD: ${METRICBEAT_INTERNAL_PASSWORD:-}
MONITORING_INTERNAL_PASSWORD: ${MONITORING_INTERNAL_PASSWORD:-} MONITORING_INTERNAL_PASSWORD: ${MONITORING_INTERNAL_PASSWORD:-}
BEATS_SYSTEM_PASSWORD: ${BEATS_SYSTEM_PASSWORD:-} BEATS_SYSTEM_PASSWORD: ${BEATS_SYSTEM_PASSWORD:-}
cgroup: host
networks: networks:
- elk - elk
depends_on: depends_on: