Skip to content

Commit

Permalink
Add section on cgroupns usage (#39889)
Browse files Browse the repository at this point in the history
  • Loading branch information
fearful-symmetry authored Jun 13, 2024
1 parent de63284 commit 974ace6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions metricbeat/docs/running-on-docker.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ docker run \
--mount type=bind,source=/var/run/dbus/system_bus_socket,target=/hostfs/var/run/dbus/system_bus_socket,readonly \ <4>
--env DBUS_SYSTEM_BUS_ADDRESS='unix:path=/hostfs/var/run/dbus/system_bus_socket' \ <4>
--net=host \ <5>
--cgroupns=host \ <6>
{dockerimage} -e -system.hostfs=/hostfs
----

Expand All @@ -45,6 +46,7 @@ both require access to dbus. Mount the dbus socket and set the `DBUS_SYSTEM_BUS_
to make this file contain the host's network devices is to use the `--net=host`
flag. This is due to Linux namespacing; simply bind mounting the host's `/proc`
to `/hostfs/proc` is not sufficient.
<6> Runs the container using the host's cgroup namespace, instead of a private namespace. While this is optional, <<metricbeat-metricset-system-process,system process metricset>> may produce more correct cgroup metrics when running in host mode.

NOTE: The special filesystems +/proc+ and +/sys+ are only available if the
host system is running Linux. Attempts to bind-mount these filesystems will
Expand Down

0 comments on commit 974ace6

Please sign in to comment.