Can't find log after 30 seconds

Hi, I have been playing around Loki and done some experiments and just find that, when there was new log/text added to log file, I could run query and see it at first (in Grafana Explorer) but it was gone if I ran the same query again after around 30 seconds. Is it possible that I accidentally broke something during experiments?

I’ve also tried to use this template config (Examples | Grafana Labs) and changed chunk_retain_period to 90s but it was still gone after around 30 seconds.

I guess the Promtail config should have nothing to do with this issue, right? Could you please let me know what I may do wrong? I have been looking for the solution(s) for days. Any advice/suggestion would be appreciated.


I have experienced a similar problem and it seems to be due to Promtail not following a lot after it’s been rotated. It seems to not be able to detect a log file rotation event.