Hi,
Where can I find the documentation on clean up/rotate those logs in indico? Thank you.
Jacky
Hi,
Where can I find the documentation on clean up/rotate those logs in indico? Thank you.
Jacky
That’s kind of outside the scope of Indico itself, but standard tools like logrotate do the job fine for us; just make sure to reload uwsgi afterwards so the log files get reopened.
Ok…no problem. I thought Indico has something that does it. Thanks.
Jacky
I am using logrotate
to rotate Indico logs and I am reloading indico-uwgsi afterwards (postrotate script) as suggested by you (@ThiefMaster). I noticed that the new logfile is not used for these handlers: indico.emails
, indico.rb
, indico
. Other handlers are using the new logfile. What other service do I need to restart after rotation so these handlers will also use the new file?
As an alternative I could use copytruncate
option of logrotate
. But manpage says that some logging data might get lost then.
Thank you!
If you provided specific log entries instead of just handler names I could give you an more reliable answer - depending on what’s getting logged it may either be from celery or uwsgi.
In any case, there’s a good chance that the logs in questions are coming from celery, so you need to restart this as well.
FWIW, this is what we have in our logrotate config:
/opt/indico/log/indico.log /opt/indico/log/celery.log /opt/indico/log/other.log {
compress
create 0644 indico indico
daily
dateext
delaycompress
missingok
notifempty
olddir old
rotate 400
sharedscripts
postrotate
systemctl reload indico-uwsgi || true
systemctl try-restart indico-celery || true
endscript
}