We're having some trouble with filebeat not releasing files after logrotate is run.
Here is the filebeat conf:
filebeat: prospectors: - paths: - /home/vhosts/XXXX/current/log/production.log document_type: production - paths: - /var/log/alternatives.log - /var/log/apport.log - /var/log/auth.log - /var/log/bind.log - /var/log/boot.log - /var/log/btmp - /var/log/dhcpd.log - /var/log/diskmap.log - /var/log/faillog - /var/log/firewall.log - /var/log/kern.log - /var/log/lastlog - /var/log/mail.log - /var/log/syslog document_type: syslog - paths: - /var/log/nginx/error.log document_type: nginx_error - paths: - /var/log/nginx/access.log document_type: nginx - paths: - /var/log/haproxy.log document_type: haproxy - paths: - /var/log/ceph/*.log document_type: ceph
input_type: log exclude_files: [".gz$",".1$"] scan_frequency: 5s ignore_older: 24h close_older: 5m registry_file: /var/lib/filebeat/registry ############################# Output ########################################## output: logstash: hosts: ["10.130.192.99:9223","10.130.192.114:9223"] loadbalance: true worker: 1 compression_level: 3 loadbalance: true index: filebeat ############################# Shipper ######################################### shipper: tags: ["filebeat", "txc1","XXXX","US"] geoip: paths: - "/usr/share/GeoIP/GeoLiteCity.dat" ############################# Logging ######################################### logging: to_syslog: false to_files: true files: path: /var/log/mybeat name: filebeat rotateeverybytes: 10485760 # = 10MB keepfiles: 7 level: debug
Particularly /var/log/firewall.log is kept open after it is renamed to /var/log/firewall.log.1