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

Loki accepts push requests with empty label matchers #3638

Closed
slim-bean opened this issue Apr 22, 2021 · 0 comments · Fixed by #3643
Closed

Loki accepts push requests with empty label matchers #3638

slim-bean opened this issue Apr 22, 2021 · 0 comments · Fixed by #3643

Comments

@slim-bean
Copy link
Collaborator

Example:

 curl -v -H "Content-Type: application/json" -XPOST -s "http://localhost:3100/loki/api/v1/push" --data-raw '{"streams": [{ "stream": {}, "values": [ [ "'$(date +%s%N)'", "fizzbuzz" ] ] }]}'

This results in Loki creating a stream and storing these logs, eventually persisting them into chunks as well.

It's not possible to query for such logs nor does it really make any sense for Loki to store them.

This should result in an error on push.

cyriltovena added a commit to cyriltovena/loki that referenced this issue Apr 22, 2021
Fixes grafana#3638

Signed-off-by: Cyril Tovena <cyril.tovena@gmail.com>
cyriltovena added a commit that referenced this issue Apr 22, 2021
* Rejects push requests with  streams without labels.

Fixes #3638

Signed-off-by: Cyril Tovena <cyril.tovena@gmail.com>

* Missing commit

Signed-off-by: Cyril Tovena <cyril.tovena@gmail.com>
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

Successfully merging a pull request may close this issue.

1 participant