Skip to content

Loki 3.5 - structured_metadata: msg="negative structured metadata bytes received" if no structured_metadata send or 0 Bytes (flowlogs-pipeline, Loki Alert State History) #17569

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

Closed
Nachtfalkeaw opened this issue May 4, 2025 · 2 comments

Comments

@Nachtfalkeaw
Copy link

Nachtfalkeaw commented May 4, 2025

Describe the bug
An application (https://github.com/netobserv/flowlogs-pipeline) sends data directly to loki without any structured_metadata. This results in Loki error message.
The error message indicates that structured_metadata is zero bytes which is not negative.

May 4 22:14:47 u999fm1lo002p loki[1019654]: level=error ts=2025-05-04T20:14:47.357165682Z caller=push.go:202 org_id=tenant_02 msg="negative structured metadata bytes received" userID=tenant_02 retentionHours=8760 isAggregatedMetric=false policyName= size=0

To Reproduce
Steps to reproduce the behavior:

  1. Started Loki 3.5
  2. Started https://github.com/netobserv/flowlogs-pipeline
  3. send logs to loki with no structured_metadata

Expected behavior
No error message. The error message should clearly indicate the source which send the logs with no structured_metadata.

Environment:

  • Infrastructure: RHEL8
  • Deployment tool: monolithic

Screenshots, Promtail config, or terminal output
N/A

Ticket at flowlogs-pipeline:
netobserv/flowlogs-pipeline#949

@Nachtfalkeaw Nachtfalkeaw changed the title Loki 3.5 - structured_metadata: msg="negative structured metadata bytes received" if no structured_metadata send (0 Bytes) (flowlogs-pipeline) Loki 3.5 - structured_metadata: msg="negative structured metadata bytes received" if no structured_metadata send or 0 Bytes (flowlogs-pipeline, Loki Alert State History) May 7, 2025
@Nachtfalkeaw
Copy link
Author

I found out that this also happens for the Grafana Alerts which are sent to Lokia as "Alert State History" Feature. These do not contain structured_metadata, too and these create this message, too.

So this is not related to flowlogs-pipeline application but any other application, from Grafana stack, too . if not structured_metadata exists which results in 0 Bytes, this leads to this error message in Loki.

@Nachtfalkeaw
Copy link
Author

Looks Like it was addresses Here
#17371

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

1 participant