Diagnostic step 1
Do not immediately delete the registry in production. Back up the existing registry file first for forensic analysis: cp /var/lib/filebeat/registry /var/lib/filebeat/registry.bak.
Generated Oct 3, 2026, 12:35:03 AM
Do not immediately delete the registry in production. Back up the existing registry file first for forensic analysis: cp /var/lib/filebeat/registry /var/lib/filebeat/registry.bak.
Run Filebeat in debug mode (filebeat -e -d 'publish' and 'input') on a staging copy of the registry to observe how Filebeat interprets entries and which files it will harvest; perform this on a non-production copy to validate behavior.
If duplicates are acceptable short-term, remove or move the registry and restart Filebeat to recover missing logs, then use deduplication queries in Elasticsearch to clean duplicates later. If duplicates are unacceptable, restore registry from recent host backup if available.
To reduce risk going forward: (a) place registry on a filesystem with writeback guarantees or a small battery-backed storage, (b) enable short flush intervals (registry_flush: 1s) so Filebeat flushes its registry frequently, and (c) ensure graceful shutdown of Filebeat during host maintenance using systemd stop hooks.
If unsure how to reconcile registry entries safely or if this affects many hosts, escalate to the logging/SRE team so they can assist with registry repair, Elasticsearch deduplication strategies, and possible Filebeat upgrade that addresses any registry-format issues.