Unfortunately I've noticed yet another problem with registry file updates in my setup:
Filebeat Version: 5.0.1
Steps to repro:
- Start filebeat with tail_files: true to get initial state of files.
tail_files: true
At this point everything works fine.
- After a longer moment stop Filebeat, change tail_files back to false to continue from that point.
tail_files: false
# ls -l /var/lib/filebeat/registry
-rw-r--r-- 1 root root 504152 Nov 22 18:54 /var/lib/filebeat/registry
Observed problem: Filebeat continues delivering messages, but no registry update is ever made:
# curl -s http://localhost:6060/debug/vars | egrep "logstash|registr|harvester|prospector"
"filebeat.harvester.closed": 263,
"filebeat.harvester.files.truncated": 0,
"filebeat.harvester.open_files": 387,
"filebeat.harvester.running": 387,
"filebeat.harvester.skipped": 0,
"filebeat.harvester.started": 650,
"filebeat.prospector.log.files.renamed": 0,
"filebeat.prospector.log.files.truncated": 0,
"libbeat.logstash.call_count.PublishEvents": 432,
"libbeat.logstash.publish.read_bytes": 3408,
"libbeat.logstash.publish.read_errors": 0,
"libbeat.logstash.publish.write_bytes": 440049709,
"libbeat.logstash.publish.write_errors": 0,
"libbeat.logstash.published_and_acked_events": 719514,
"libbeat.logstash.published_but_not_acked_events": 0,
"registrar.states.cleanup": 0,
"registrar.states.update": 0,
"registrar.writes": 0
# date
Tue Nov 22 19:16:47 UTC 2016
# ls -l /var/lib/filebeat/registry
-rw-r--r-- 1 root root 504152 Nov 22 18:54 /var/lib/filebeat/registry
END result: any subsequantial restart will trigger resending data collected from the point where registry files was updated last time (before restart in point 2))
Note: If I leave tail_false as true, I might restart filebeat without any problem and registry file WILL be updated as expected.