Filebeat is not writing log to Destination folder

Hi Team,

In my current project I am using filebeat to load csv files to Elasticsearch but filebeat is not writing the log files in to the destination folder instead it is writing /var/log/messages file. Could you please advise why it is happening like this.
Below is the configuration of filebeat.yml.

logging.level: debug
files:
  path: /var/log/filebeat
  name: filebeat.log
  keepfiles: 7

Thanks,
Debasis

Hi!
Can you try

logging:
  level: debug  
  to_files: true
  files:
    path: /var/log/filebeat
    name: filebeat.log
    keepfiles: 7

Thanks @iulia for help. Is there any way we can mention the log file size because after 11MB it is creating one more new file.

Thanks,
Debasis

Happy to help!
You can change the logging.files.rotateeverybytes parameter, the default is to create a new file at 10485760 (10 MB). So you can increase this if you want to keep a bigger file before switching.
See reference to all the parameters here:

1 Like

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