Skip to content

[loki-canary] Stream label configuration

Closed

Description

Is your feature request related to a problem? Please describe.

We are currently trying to get loki-canary to work with the Docker log driver in a Swarm environnement. But it seems they are simply not compatible, as loki-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:

loki-canary:
  query={stream="stdout",swarm_service="monitoring_loki-canary"} => KO (Empty)

manually:
  query={source="stdout",swarm_service="monitoring_loki-canary"} => Success

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    good first issueThese are great first issues. If you are looking for a place to start, start here!These are great first issues. If you are looking for a place to start, start here!help wantedWe would love help on these issues. Please come help us!We would love help on these issues. Please come help us!keepaliveAn issue or PR that will be kept alive and never marked as stale.An issue or PR that will be kept alive and never marked as stale.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions