Skip to content
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

fluentd loki output plugin docs: clarify that at least one label must be set explicitly #1910

Closed
jgehrcke opened this issue Apr 7, 2020 · 0 comments

Comments

@jgehrcke
Copy link
Contributor

jgehrcke commented Apr 7, 2020

Here is the documentation for https://github.com/grafana/loki/tree/master/fluentd/fluent-plugin-grafana-loki: https://github.com/grafana/loki/blob/master/docs/clients/fluentd/README.md

It says

In your Fluentd configuration, use @type loki. Additional configuration is optional,

I can't quite confirm that. Looks like you have to set explicitly at least one label.

Labels set on a a previous filter stage are not automatically inherited / used.

When using this:

<match **>
  @type loki
  url "https://logs-us-west1.grafana.net"
</match>

then the plugin sends out the stream fragments with an empty label set, resulting in Loki answering with

400 Bad Request error parsing labels: parse error at line 1, col 2:
syntax error: unexpected }, expecting IDENTIFIER

That is of course a misleading error message. What it means is that the stream object is empty: {} -- no labels set.

Looks like it's not just us falling for that: Also see #1347

I have quickly added a note here: #1909

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants