FileBeat log rollover

We are using filebeat to get log. I recently faced an issue which is annoying me.

I have the filebeat configuration as log*.log because every time when log size reaches 10mb my application creates new log and renames the old log to log1.log.

But now, due to filebeat, my application is unable to create new log as it is being opened by filebeat and log size goes upto GBs.

How should I get rid of the problem?

Basically, filebeat is not allowing Apache log rotation to happen.

Any reply would be highly appreciated

Could you please share your configuration formatted using </>?

It's pretty simple as below.
Whenever log file reaches 10MB, app.log gets rotated to app1.log and so on by our log rotation policy in application.

But since we have filebeat which monitors app.log all the time, it never allows log rotation to happen and instead app.log keeps growing in GBs.

And i do see an option for log rotation through filebeat but what I want is, as our application is already doing log rotation, we don't want filebeat to disturb log rotation.

filebeat.inputs:
- type: log
  paths:
    - C:\\ProgramData\\location\\center\\logs\\app*.log* 
  close_renamed: true
fields:
 log-type: "center"
 customer: "abc"
 app-type: "center"
output.logstash:
  hosts: ["<ip>:5044"]

Any reply?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.