This is a customized Docker image of grafana/promtail with configuration to scrape logs from Docker and apply labels from Rancher 1.6 labels.
When deploying this image, it needs privileged access to the host and the Docker socket /var/run/docker.sock mounted and accessible in the image.
Environment configuration:
LOKI_URLthe URL for the Loki server (default: http://loki:3100/loki/api/v1/push)TENANT_IDthe Loki tenant ID (default:manas)ENVIRONMENTthe value for a static labelenvapplied to all pushed logs
The pushed logs have extra labels:
containercomputed from the Docker container namestack_servicecomputed from the container labelio.rancher.stack_service.name
Also, logs for Rancher system containers (ie. those with a label io.rancher.container.system=true) are not pushed.