Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[featurerequest] kunai log rotate custom permissions #177

Open
juju4 opened this issue Feb 16, 2025 · 1 comment
Open

[featurerequest] kunai log rotate custom permissions #177

juju4 opened this issue Feb 16, 2025 · 1 comment

Comments

@juju4
Copy link

juju4 commented Feb 16, 2025

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

@juju4
Copy link
Author

juju4 commented Mar 2, 2025

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant