-
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
[loki-canary] Stream label configuration #1435
Comments
This issue has been automatically marked as stale because it has not had any activity in the past 30 days. It will be closed in 7 days if no further activity occurs. Thank you for your contributions. |
This looks like a potential easy win, is there no one to have a look at it ? |
This issue has been automatically marked as stale because it has not had any activity in the past 30 days. It will be closed in 7 days if no further activity occurs. Thank you for your contributions. |
I'm experiencing the same problem. Can we reopen this? |
Currently canary is requiring a hardcoded label "stdout" (grafana/loki#1435) When the messages from canary would be forwarded via systemds journal, this label would be missing and/or we would require to have a very specific labelset to get canary to work as expected In this commit a workaround is introduced, by redirecting the output from canary to a file and using promtails file_sd to discover and scrape this file Additionally logrotate was used to prevent the disk from running out of space
Is your feature request related to a problem? Please describe.
We are currently trying to get
loki-canary
to work with theDocker log driver
in a Swarm environnement. But it seems they are simply not compatible, asloki-canary
is incapable of fetching the correct labels (there are "labelname" and "labelvalue" configurations already, but one is missing for "stream").Loki-canary expects a "stream" label (stdout/stderr), while the Docker log driver publishes this under the "source" label. Looking at the source code, it looks like both are hardcoded.
Example:
Source:
loki-canary (reader.go #L106)
Docker log driver (loki.go #L60)
Describe the solution you'd like
Both projects should allow customization, starting with
loki-canary
to mitigate this very case.But I think that the
Docker log driver
should too, in order to play nice with other implementations based on "stream" that might exist (canary, generic grafana dashboards, etc)Describe alternatives you've considered
There are no known workarounds.
We could use promtail of course, but it would defeat the purpose of
loki-canary
, since we would use a different log transmission medium for the rest of the swarm (Docker log driver
).Additional context
none
The text was updated successfully, but these errors were encountered: