You may need to do log management for your Anaconda Enterprise Repository or Anaconda Enterprise Notebooks installation. Log files may grow to large sizes and takes the required disk space on your server.
There are no configurable options to change the software logs but you can manage log size and storage on daily, weekly or monthly interval using logrotate, a Linux utility program available on many Linux systems.
Logrotate allows you to rotate out log file on a timed interval or when files reach a certain size. Logrotate can then compress the log files to save space and remove the oldest log archive after a certain amount of archived logs are reached.
AE-Notebooks has three log directories:
AE-Repository has one log directory:
The directory paths are used when creating a Logrotate configuration file for the service.
Here is an example Lograte file:
/sbin/service wakari-gateway restart
It can be placed in
/etc/lograte.d/. In this directory you can create a file with the name of the service you are rotating logs for wakari-server, wakari-gateway, wakari-compute and anaconda-server.
Directives which may be included in a logrotate configuration file:
- rotate command determines how many archived logs are returned before logrotate start deleting the older ones.
- daily command instructs Logrotate how often to rotate a particular log - daily, weekly, monthly or yearly.
- size command specifies how large the file should be before rotating. It overrides daily or other intervals.
- compress command archive the log files to be compressed in gzip format.
- dateext rotates the old log file with date in the log filename.
- missingok command will not return an error if log file is missing.
- notifempty command is to not rotate if the file is empty.
Also see the other configuration options to tailor your log archiving needs.