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
no logs found while data can be seen in live stream in grafana cloud #12935
Comments
The data you sent via the |
No, I have tried By the way, label selector can find the label shortly after the data was sent. But after a long time, the label selector found nothing either. It seems like logs has some default expiration period. I don't know whether the above phenomenon show more evidence to find the reason behind it |
May I access your instance? |
Sure, but please give me an e-mail address, I'll send account and password to you. update: |
No worries, I work here, just needed your permission to access. :) I logged in and definitely was able to reproduce what you are seeing. I also have been experimenting with my own Grafana cloud instance. I wonder if there's a slight error with the curl command? I was running For reference, my
|
I have run the same curl as yours, but once again new labels appeared in grafana, but the logs themself cannot be queried. And the loki url I used is Below is the response after curl, it may help find the resaon:
|
I'm seeing logs in your instance now. explore query |
From your link, I can now see the previous logs now. Thank you. But there's a long delay from sending them to seeing them, is it an expected behaviour? |
I think what you are seeing is a side effect of ingesting "old" logs. This is very nuanced, but if you send logs that are not recent (around "now"), they are not immediately queryable. (There's also nuances about sending items out of order too, but that isn't the issue in this case) For a curl command, you could try using something like At this point though, I would recommend playing around with ingesting logs in a traditional fashion. The Another possible idea would be to use this article as a guide on sending your shell history to Loki. I'm glad you are up and running, and I hope you find value with Loki! |
It occurred to me that my answer may not have been entirely clear. Generally, when ingesting logs that are "now", you'll see them and they will be queryable almost instantaneously. What you are seeing is a side effect of "old" logs. I hope that helps. |
Thank you very much for your help. I truly appreciate your kindness in helping me find the appropriate method to send logs to Grafana Cloud using Loki. When I send logs with the current timestamp, everything works as expected. |
Logs are sent to loki and grafana in cloud, they can be seen in live stream mode, and the labels they brought appear.
However, the logs themself disappear.
The request body is below, the logs are sent to loki by raw http request.
They can be seen in live stream:
But they disappeared when querying:
The query time rangeis correct, I use the the last 7 days option.
The text was updated successfully, but these errors were encountered: