This became a problem during the lma->cos transition, we have grafana-agents consuming more than 3000% cpu due to /var/log/libvirt/qemu/ having more than 120k files.
I believe this wasn't an issue with lma, because filebeat was set to scan a single level inside /var/log and the grafana-agent is multilevel.
The lastaction workaround on #2 would probably work, but unfortunately charm-logrotated only allows for overriding 'rotate', 'interval' and 'size'. The possibility of a custom template for a particular file would be nice.
This became a problem during the lma->cos transition, we have grafana-agents consuming more than 3000% cpu due to /var/log/ libvirt/ qemu/ having more than 120k files.
I believe this wasn't an issue with lma, because filebeat was set to scan a single level inside /var/log and the grafana-agent is multilevel.
The lastaction workaround on #2 would probably work, but unfortunately charm-logrotated only allows for overriding 'rotate', 'interval' and 'size'. The possibility of a custom template for a particular file would be nice.