Hello - just started using filebeat in a very simple setup and am seeing some odd behavior. My configuration is as follows:
filebeat:
prospectors:
-
paths:
- /usr/src/app/*.log
input_type: log
exclude_files: [".gz$"]
registry_file: "/usr/src/app/filebeat/registry"
output:
logstash:
hosts: ["myserver.com:10200"]
index: log
shipper:
logging:
files:
path: /var/log/filebeat/
The behavior I'm noticing is that every time I manually modify a log file every line in the file is sent to logstash. Meaning if I have a log file with two lines in it that have already been logged, then I add one more entry and save, all three lines are sent. It looks like the registry is properly updated - the offset changes each time I modify the file.
Probably something stupid I'm doing - any suggestions?
Here's the registry file:
{"/usr/src/app/log.log":{"source":"/usr/src/app/log.log","offset":400,"FileStateOS":{"inode":663,"device":31}},"/usr/src/app/log2.log":{"source":"/usr/src/app/log2.log","offset":180,"FileStateOS":{"inode":618,"device":31}}}