Copied from gitter https://gitter.im/timberio-vector/community?at=5f3172bcd28b99685e55795a
Hi, I am running into an issue with vector that it's not closing file descriptors on rotation of files via logrotate (file source). These are nginx logs. This is is happening for already rotated *.access.log.1 files which are rotated a second time, to *.access.log.2.gz. These deleted file descriptors accumulate over a period of time and we have to restart vector to fix disk alerts. Fingerprinting is currently configured with checksum strategy, with file source configured to check only for *.access.log file.
Vector config:
[sources.nginx_access_logs]
type = "file"
include = ["/mnt/log/nginx/*.access.log"]
glob_minimum_cooldown = 10000
max_line_bytes = 102400
file_key = "file"
host_key = "hostname"
max_read_bytes = 20480
oldest_first = true
[sources.nginx_access_logs.fingerprinting]
fingerprint_bytes = 256
ignored_header_bytes = 0
strategy = "checksum"
logrotate config:
/mnt/log/nginx/*.log {
size 1G
missingok
rotate 3
compress
delaycompress
notifempty
create 644 www-data adm
sharedscripts
postrotate
[ -f /var/run/nginx.pid ] && kill -USR1 `cat /var/run/nginx.pid`
endscript
}
Copied from gitter https://gitter.im/timberio-vector/community?at=5f3172bcd28b99685e55795a
Vector config:
logrotate config: