Log rotation?

32 views
Skip to first unread message

Karen Tovmasian

unread,
Dec 7, 2016, 8:18:12 AM12/7/16
to privacyidea
Hello!

We've run into problems with our Privacyidea installation with the logs (they ate all the space). When i checked the contents of /var/log/privacyidea i've seen stuff like this:

# ls -l | head


total 729040


-rw-r-----. 1 privacyidea privacyidea     0 Dec  7 14:00 privacyidea.log


-rw-r-----. 1 privacyidea privacyidea     0 Dec  4 04:00 privacyidea.log-20160731.gz-20160807.gz


-rw-r-----. 1 privacyidea privacyidea     0 Dec  4 04:00 privacyidea.log-20160731.gz-20160807.gz-20160814.gz-20160821.gz


-rw-r-----. 1 privacyidea privacyidea     0 Dec  4 04:00 privacyidea.log-20160731.gz-20160807.gz-20160814.gz-20160821.gz-20160828.gz-20160904.gz


-rw-r-----. 1 privacyidea privacyidea     0 Dec  4 04:00 privacyidea.log-20160731.gz-20160807.gz-20160814.gz-20160821.gz-20160828.gz-20160904.gz-20160911.gz-20160918.gz


-rw-r-----. 1 privacyidea privacyidea     0 Dec  4 04:00 privacyidea.log-20160731.gz-20160807.gz-20160814.gz-20160821.gz-20160828.gz-20160904.gz-20160911.gz-20160918.gz-20160925.gz-20161002.gz


-rw-r-----. 1 privacyidea privacyidea     0 Dec  4 04:00 privacyidea.log-20160731.gz-20160807.gz-20160814.gz-20160821.gz-20160828.gz-20160904.gz-20160911.gz-20160918.gz-20160925.gz-20161002.gz-20161009.gz


-rw-r-----. 1 privacyidea privacyidea     0 Dec  4 04:00 privacyidea.log-20160731.gz-20160807.gz-20160814.gz-20160821.gz-20160828.gz-20160904.gz-20160911.gz-20160918.gz-20160925.gz-20161002.gz-20161009.gz-20161016.gz


-rw-r-----. 1 privacyidea privacyidea     0 Dec  4 04:00 privacyidea.log-20160731.gz-20160807.gz-20160814.gz-20160821.gz-20160828.gz-20160904.gz-20160911.gz-20160918.gz-20160925.gz-20161002.gz-20161009.gz-20161016.gz-20161023.gz


This is a bit strange. Plus i couldn't find any setting for logrotation in Privacyidea configuration. Can someone help me out?
Message has been deleted

Michał Lewandowski

unread,
Mar 10, 2017, 3:44:32 AM3/10/17
to privacyidea
Hello,

Please create new logrotate configuration for privacyidea in /etc/logrotate.d/.
Example conf:

/var/log/privacyidea/*.log {
        daily
        missingok
        rotate 14
        compress
        delaycompress
        notifempty
        create 640 privacyidea www-data
}

Regards,
Michal

Jochen Hein

unread,
Mar 10, 2017, 12:49:16 PM3/10/17
to Karen Tovmasian, privacyidea
Karen Tovmasian <k.tov...@coolblue.nl> writes:

> We've run into problems with our Privacyidea installation with the logs
> (they ate all the space). When i checked the contents of
> /var/log/privacyidea i've seen stuff like this:

> -rw-r-----. 1 privacyidea privacyidea 0 Dec 4 04:00 privacyidea.log-
> 20160731.gz-20160807.gz-20160814.gz-20160821.gz-20160828.gz-20160904.gz-
> 20160911.gz-20160918.gz-20160925.gz-20161002.gz-20161009.gz-20161016.gz-
> 20161023.gz
>
> This is a bit strange. Plus i couldn't find any setting for logrotation in
> Privacyidea configuration. Can someone help me out?

Please see
https://groups.google.com/forum/#!searchin/privacyidea/Jochen%7Csort:relevance/privacyidea/fyEBFmQbs3E/BJickJmcCwAJ
and
http://privacyidea.readthedocs.io/en/latest/installation/system/logging.html#advanced-logging

In short: privacy rotates the logs without logrotate, but the filename
looks like a broken logrotate config.

Jochen
Reply all
Reply to author
Forward
0 new messages