I’m setting up Grafana Alloy as a DaemonSet to collect pod logs from each node. I understand that Alloy keeps a position file or state file to track which log lines it has already read.
My question:
If an Alloy pod restarts on a node, will it re-read logs from the beginning, or does it persist the position somewhere?
What’s the recommended approach to avoid duplicate log ingestion in this scenario?
Should I mount a hostPath volume for Alloy’s storagePath?
Or is there a built-in way for Alloy to persist state per node?
I want to make sure we don’t duplicate log lines while still using DaemonSet mode for full node coverage.
I don’t use that helm chart myself, maybe your configuration is right. I would double check your container, check your pod description, and figure out why the mount is not writable.
Just in case other folks look into this. The extra field above is only part of the values.yaml file in you helm chart. That shouldn’t be added to the daemonset template yaml file.