noobaa-core icon indicating copy to clipboard operation
noobaa-core copied to clipboard

Enhance logrotate function to support syslog-ng if it used

Open ps20renar opened this issue 8 months ago • 1 comments

Is your feature request related to a problem? Please describe. Currently the logrote config and script support only rsyslog. This should be enhanced to add also syslog-ng if it used

Describe the solution you'd like If the config-option used SYSLOG_SERVICE: "syslog-ng" the log rotate config should point to a logrotate_noobaa.conf that pointed to syslog-ng.

Describe alternatives you've considered Description of alternative solutions or features you've considered.

Additional context As an example: /var/log/noobaa.log { daily maxsize 100M minsize 50M start 1 missingok rotate 100 compress create 644 root root sharedscripts postrotate systemctl reload syslog-ng > /dev/null 2>&1 sleep 5 endscript }

/var/log/noobaa_events.log { daily maxsize 100M minsize 10M start 1 missingok rotate 100 compress create 644 root root sharedscripts postrotate systemctl reload syslog-ng > /dev/null 2>&1 sleep 5 endscript }

/var/log/client_noobaa.log { size 100M start 1 missingok rotate 10 compress create 644 root root sharedscripts postrotate systemctl reload syslog-ng > /dev/null 2>&1 sleep 5 endscript }

ps20renar avatar May 30 '24 08:05 ps20renar