Filebeat always read log from beginning - Linux


(CaoPing) #1

Hello,

I'm finding filebeat always reads log information from the beginning, so there are many duplicated log events. This issue occurred in filebeat 1.2.3 and 5.0.0-alpha. My configuration for filebeat 5.0.0-alpha is as below.

filebeat.prospectors:

  • input_type: log
    paths:
    • /root/test/test.log
      output.file:
      path: "/root/test"
      filename: filebeat_output.log

other settings are kept as their default values.

I saw a response from @ruflin, it said, filebeat has problem with shared file system or the mounted disks. But I don't think I'm using the shared file system or mounted disk. Actually, what I'm using is a VM on cloud.

Does anyone help me on that? Thanks a lot.


(CaoPing) #2

Found the reason. I used vim to edit log file for test, which caused inode changed once in a while. Now I change to use cat, and that issue disappeared.


(Mark Walkom) #3

Thanks for posting the answer to this!


(system) #4

This topic was automatically closed after 21 days. New replies are no longer allowed.