Open sgielen opened 2 months ago
Probably related to this issue: https://github.com/grafana/loki/issues/6066
This issue has not had any activity in the past 30 days, so the needs-attention
label has been added to it.
If the opened issue is a bug, check to see if a newer release fixed your issue. If it is no longer relevant, please feel free to close this issue.
The needs-attention
label signals to maintainers that something has fallen through the cracks. No action is needed by you; your issue will be kept open and you do not have to respond to this comment. The label will be removed the next time this job runs if there is new activity.
Thank you for your contributions!
What's wrong?
I am trying to write a pipeline where messages with a log level of
info,debug,trace
are dropped, to reduce log volume. Some of these messages are logfmt and others are json. I started out with json:This is working as expected, dropping all JSON messages with the given level. Since I am not passing the
drop_malformed
parameters, any messages that are not JSON are passed as-is, as expected. Now, I tried to add logfmt:This is now triggering the following error in my Grafana Agent logs:
I believe that
stage.logfmt
should behave the same asstage.json
: just pass-through lines that are not in the expected format, unlessdrop_malformed
is set.Steps to reproduce
When forwarding logs that are logfmt, json or no particular format, add these extra stage blocks:
At this point, all
level=info
messages should be dropped, while e.g.level=error
(as well as lines without alevel
) should be forwarded.Instead, errors appear in the Alloy logs.
System information
Linux 5.4.0-148-generic x86_64 / Ubuntu 20.04.4 LTS
Software version
Grafana Alloy v1.2.0 as deployed by Helm chart k8s-monitoring v1.3.0
Configuration
Logs