Univention Bugzilla – Bug 54247
Rotate log of OPA output
Last modified: 2022-05-04 10:46:55 CEST
With v1.5.1 of the Kelvin REST API, OPA was added including its own logfile. However, this does not seem to get rotated: > root@ucs-001:~# ls -lah /var/log/univention/ucsschool-kelvin-rest-api/opa.log* > -rw-r----- 1 root root 517M Dez 14 13:45 /var/log/univention/ucsschool-kelvin-rest-api/opa.log +++ This bug was initially created as a clone of Bug #53961 +++ The output of the Open Policy Agent should be logged.
Built image for 1.5.5 (Image ID: `4525cd0ea8fd`). New version of the app (1.5.5) is unpublished but ready for review. Tested and logrotation works.
Thank you, works very well. Solution description: * The logrotate executable is installed into the Kelvin Docker container. * The cron daemon (and as a dependency syslog) is installed into the Kelvin Docker container. * A crontab entry is created for the cron daemon to start logrotate every day, as a UCR template. * The crontab entry can be modified through two appsettings, resulting in UCR changing the crontab file. BTW: the starting of the cronjob only once per day (at 2:00 am) means, that changing the appsettings to rotate more often than once per day will not work. IMHO that is OK.
> * The crontab entry can be modified through two appsettings, resulting in UCR changing the crontab file. Correction: The logrotate config is modified by appsettings/UCR, not the cronjob.