kunai
kunai copied to clipboard
[featurerequest] kunai log rotate custom permissions
I want to retrieve /var/log/kunai/events.log through a log collector tool (otel) which runs as non-root.
It needs read access for systemd-journal group, openobserve-agent user or other.
Because kunai handles directly log files rotation, logrotate post-rotate is not an option to add an extra acl like setfacl -m g:systemd-journal:r -- $1.
Could you add an option for it?
Thanks
two simpler options than acl would be
- option to customize log user/group
- option to disable log rotation to use other tools like logrotate
I checked workaround with inotifywait, watchexec and in the end implemented systemd.path (with limitations as only file change trigger, so avoid permanent call with a TriggerLimit) https://github.com/juju4/ansible-kunai/blob/devel/templates/kunailog.path.j2