grafana / loki

Like Prometheus, but for logs.
https://grafana.com/loki
GNU Affero General Public License v3.0
23.98k stars 3.46k forks source link

Logs disapear after some time #11274

Open YaPlusDePile opened 1 year ago

YaPlusDePile commented 1 year ago

Describe the bug Hello, After some time, generaly 1h 30m (depends of quantity of logs) the logs disapear from loki. To show you, i've activated the auto refresh on every 5 seconds on the 'explore' tab of Grafana and i've recorded my screen:

I’ve monitor the size of the data folder during the log disappear: image

The last result of query before logs disappear: image

And a few secods later: image

I've tried with V2.8.0 and it works as expected

To Reproduce Steps to reproduce the behavior:

  1. Install Loki 2.9.0 Via docker-compose
  2. Start logging of container for example
  3. Regulary query for logs
  4. After a time, the logs disapear

Expected behavior The logs doesn't have to disapear

Environment:

Screenshots, Promtail config, or terminal output The logs file of loki container at the moment when logs has disapear on previous screenshots: docker-logs.json

To more details you can go to Loki Forum: Logs disappear from Loki after some time

And if you need more details, do not hesitate to ask me.

waney316 commented 11 months ago

hello, I get the same issue,my loki version 2.9.2, when I specify a time range of 6 hours, I can only see logs from the last hour or two. image

zhao-chung commented 11 months ago

怎么解决一段时间后,grafana 展示日志出现 微信图片_20231205144919 ,提示文件不存在,该怎么解决。

summed commented 11 months ago

11301 Is this related?

exabugs commented 10 months ago

8023 Is this related?

blacksheepaul commented 6 months ago

It seems fixed in Fix bug in cache of the index object client #10585. Related to When using single store (tsdb, boltdb-shipper), indexes and chunks are shipped to object storage but queries are (partly) empty #10529