This is a cross post of my question on the closed issue 429.
I had the grafana-agent reading from a file that it did have access to but now does not. I updated my job to read the log from a new location which is working as expected, but the agent is attempting to update metadata about the prior log and filling up my sys logs. How can I get loki to completely forget about the previous file?
Here is the log output:
Jul 6 15:03:33 localhost grafana-agent: ts=2023-07-06T15:03:33.342184934Z caller=positions.go:206 level=warn component=logs logs_config=integrations msg="could not determine if log file still exists while cleaning positions file" error="stat /root/.pm2/logs/server-out-0.log: permission denied"
See my post on issue 429 for more configuration details