Last active
March 1, 2025 10:02
-
-
Save illiafox/9c62804b5992e82a254fb6411148a0b2 to your computer and use it in GitHub Desktop.
Promtail Read Docker Logs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server: | |
http_listen_port: 10080 | |
grpc_listen_port: 0 | |
positions: | |
filename: /tmp/positions.yaml | |
clients: | |
- url: "http://localhost:9428/insert/loki/api/v1/push" | |
scrape_configs: | |
- job_name: containers | |
docker_sd_configs: | |
- host: unix:///var/run/docker.sock | |
refresh_interval: 15s | |
pipeline_stages: | |
- docker: {} | |
- static_labels: | |
job: "containers_logs" | |
relabel_configs: | |
- source_labels: ['__meta_docker_container_name'] | |
regex: '/(.*)' | |
target_label: 'container' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment