How to remove deleted log lines in Loki Grafana

480 Views Asked by At

I have a Promtail instance that reads log files and sends them to a Loki instance.

When a new log line is generated, Promtail sends it to Loki, and it appears as a new log line in my Grafana dashboard, which is great.

However, if my application that writes the logs deletes log files older than 7 days, it seems that Promtail does not notify Loki about the deletion of log lines.

Is there a way for Loki to stay up to date with the log deletion events from the Promtail instance?

I have attempted to configure log retention in the Loki configuration, but since the minimum retention period is 24 hours, I need to wait a bit to observe how it functions.

0

There are 0 best solutions below