Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document known Docker driver issues. #4190

Merged
merged 4 commits into from
Aug 23, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions docs/sources/clients/docker-driver/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,35 @@ To cleanly uninstall the plugin, disable and remove it:
docker plugin disable loki --force
docker plugin rm loki
```

# Know Issues

The driver keeps all logs in memory and will drop log entries in case Loki is not reachable and the `max_retries` are exceeded. This can be avoided by setting `max_retries` to zero and thus trying forever until Loki is reachable again. However, this setting might have undesired consequences. The Docker daemon will wait for the Loki driver to process all logs of a container until it's removed. So it might wait forever and the container is stuck.

In order to avoid this situation it's recommended to use [Promtail](../promtail) instead with the following configuration.
jeschkies marked this conversation as resolved.
Show resolved Hide resolved

```yaml
server:
disable: true

positions:
filename: loki-positions.yml

clients:
- url: ${LOKI_ENDPOINT}
jeschkies marked this conversation as resolved.
Show resolved Hide resolved
basic_auth:
username: ${LOKI_USER}
password: ${LOKI_PASSOWORD}
jeschkies marked this conversation as resolved.
Show resolved Hide resolved

scrape_configs:
- job_name: system
pipeline_stages:
- docker: {}
static_configs:
- labels:
job: docker
__path__: /var/lib/docker/containers/*/*-json.log
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Q: will it always be JSON logs? (just *-json.log bugs me, can it be just *.log instead?)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question. The Docker pipeline steps requires the JSON log driver which is the default.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool. Thanks for clarification! :)


```

This will enable Promtail to tail *all* Docker container logs and publish them to Loki.