-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
docker-driver: loki-relabel-config does not rename container_name to the source label #3813
Comments
thanks @rgl for reporting. I think its also related to #3811 (comment) document needs to be bit clear. |
I think, this issue is a mixture of two nuanced things (that I'm now able to connect, because of what @cyriltovena described at #3812 (comment)):
To actually rename the |
Thank you for the help! Its now working with: {
"debug": true,
"log-driver": "loki",
"log-opts": {
"labels": "worker_id",
"loki-url": "http://10.10.0.2:3100/loki/api/v1/push",
"loki-external-labels": "job=docker,container_name={{.Name}}",
"loki-relabel-config": "- regex: filename\n action: labeldrop\n",
"loki-pipeline-stages": "- labels:\n source: container_name\n- labeldrop:\n - container_name\n"
}
} |
Describe the bug
loki-relabel-config
does not rename container_name to the source label.NB I'm not sure if this is related to #3812.
To Reproduce
Steps to reproduce the behavior:
logcli query --tail '{job="docker"}'
Got:
Expected behavior
I expected the
container_name
label to be renamed tosource
.The text was updated successfully, but these errors were encountered: