Skip to content

Commit

Permalink
Clarify add_docker_metadata docs (elastic#8478)
Browse files Browse the repository at this point in the history
  • Loading branch information
dedemorton committed Oct 17, 2018
1 parent d04a3ec commit ff4668c
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion libbeat/docs/processors-using.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -822,6 +822,20 @@ from Docker containers:
* Image
* Labels

[NOTE]
=====
When running {beatname_uc} in a container, you need to provide access to
Docker’s unix socket in order for the `add_docker_metadata` processor to work.
You can do this by mounting the socket inside the container. For example:
`docker run -v /var/run/docker.sock:/var/run/docker.sock ...`
To avoid privilege issues, you may also need to add `--user=root` to the
`docker run` flags. Because the user must be part of the docker group in order
to access `/var/run/docker.sock`, root access is required if {beatname_uc} is
running as non-root inside the container.
=====

[source,yaml]
-------------------------------------------------------------------------------
processors:
Expand Down Expand Up @@ -870,7 +884,6 @@ for container ID. It defaults to 4 to match
`cleanup_timeout`:: (Optional) Time of inactivity to consider we can clean and
forget metadata for a container, 60s by default.


[[add-host-metadata]]
=== Add Host metadata

Expand Down

0 comments on commit ff4668c

Please sign in to comment.