Skip to content

Commit

Permalink
Document known Docker driver issues. (#4190)
Browse files Browse the repository at this point in the history
* Document known Docker driver issues.

* Update docs/sources/clients/docker-driver/_index.md

Co-authored-by: Karen Miller <84039272+KMiller-Grafana@users.noreply.github.com>

* Update docs/sources/clients/docker-driver/_index.md

Co-authored-by: Karen Miller <84039272+KMiller-Grafana@users.noreply.github.com>

* Update docs/sources/clients/docker-driver/_index.md

Co-authored-by: Karen Miller <84039272+KMiller-Grafana@users.noreply.github.com>

Co-authored-by: Karen Miller <84039272+KMiller-Grafana@users.noreply.github.com>
  • Loading branch information
jeschkies and KMiller-Grafana authored Aug 23, 2021
1 parent d42de7e commit e25587b
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 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,38 @@ 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 if Loki is not reachable and if the quantity of `max_retries` has been exceeded. To avoid the dropping of log entries, setting `max_retries` to zero allows unlimited retries; the drive will continue trying forever until Loki is again reachable. Trying forever may have undesired consequences, because the Docker daemon will wait for the Loki driver to process all logs of a container, until the container is removed. Thus, the Docker daemon might wait forever if the container is stuck.

This issue is avoided by using [Promtail](../promtail) with this configuration:

```yaml
server:
disable: true

positions:
filename: loki-positions.yml

clients:
- url: http://ip_or_hostname_where_Loki_run:3100/loki/api/v1/push
# If using basic auth, configures the username and password sent.
basic_auth:
# The username to use for basic auth
username: <string>
# The password to use for basic auth
password: <string>

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

```

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

0 comments on commit e25587b

Please sign in to comment.