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

Promtail: configuring a drop stage with multiple sources (still) results in a format error #12244

Open
galdor opened this issue Mar 18, 2024 · 0 comments
Labels
component/promtail type/bug Somehing is not working as expected

Comments

@galdor
Copy link

galdor commented Mar 18, 2024

Describe the bug
Configuring a drop stage with multiple sources result in a format error.

This bug was already reported in #10095, supposedly fixed by f51ee84 and released as part of 2.9.5, but it apparently still occurs.

To Reproduce
Run Loki 2.9.5 with a pipeline containing a stage with multiple sources, e.g.:

- drop:
    source: ["data_event", "data_route"]
    separator: "|"
    value: "http.incoming_request|/status"

Expected behavior
The stage works.

Environment:

  • Infrastructure: Kubernetes.
  • Deployment tool: OpenTofu.

Screenshots, Promtail config, or terminal output

level=info ts=2024-03-18T10:40:57.352106218Z caller=main.go:174 msg="Starting Promtail" version="(version=2.9.5, branch=HEAD, revision=e759cae3b9)"
[...]
level=error ts=2024-03-18T10:36:53.738843187Z caller=main.go:170 msg="error creating promtail" error="failed to make file target manager: invalid match stage config: match stage failed to create pipeline from config: map[selector:{service="test"} stages:[map[json:map[expressions:map[data_event:data.event data_route:data.route domain:domain level:level msg:msg time:time]]] map[drop:map[separator:| source:[data_event data_route] value:http.incoming_request|/status]] map[timestamp:map[format:RFC3339 source:time]] map[labels:map[domain:domain level:level]]]]: invalid drop stage config: drop stage source invalid type should be string or list of strings"

The root error is "drop stage source invalid type should be string or list of strings". Loki does not recognize that yes, the source is a list of string.

@JStickler JStickler added type/bug Somehing is not working as expected component/promtail labels Mar 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/promtail type/bug Somehing is not working as expected
Projects
None yet
Development

No branches or pull requests

2 participants