Ship Docker logs to Loki
Ex: gitlab.archlinux.org and the runners.
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
- Show closed items
Link issues together to show that they're related or that one is blocking others.
Learn more.
Activity
-
Newest first Oldest first
-
Show all activity Show comments only Show history only
- Kristian Klausen changed the description
Compare with previous version changed the description
- Author Developer
This should work (but the files is owned by root :/):
diff --git a/roles/promtail/templates/promtail.yaml.j2 b/roles/promtail/templates/promtail.yaml.j2 index 96b4f932..b7d00acb 100644 --- a/roles/promtail/templates/promtail.yaml.j2 +++ b/roles/promtail/templates/promtail.yaml.j2 @@ -42,3 +42,19 @@ scrape_configs: - timestamp: format: 02/Jan/2006:15:04:05 -0700 source: time_local + - job_name: docker + static_configs: + - targets: + - localhost + labels: + job: docker + instance: {{ ansible_fqdn }} + __path__: /var/lib/docker/containers/*/*.log + pipeline_stages: + - match: + selector: '{job="docker"}' + stages: + - docker: {} + - timestamp: + format: RFC3339Nano + source: time
- Author Developer
I suppose we could configure Docker to send the logs to journald: https://docs.docker.com/config/containers/logging/journald/
- Benedict Baskar mentioned in merge request !480 (merged)
mentioned in merge request !480 (merged)
- Kristian Klausen mentioned in commit 0bd66f18
mentioned in commit 0bd66f18
- Kristian Klausen closed with merge request !480 (merged)
closed with merge request !480 (merged)
Please register or sign in to reply