Logrotated

  • Llama (LMA) Charmers
Channel Revision Published Runs on
latest/stable 33 07 Jun 2024
Ubuntu 22.04 Ubuntu 20.04 Ubuntu 18.04 Ubuntu 16.04
latest/stable 9 18 May 2023
Ubuntu 22.04 Ubuntu 20.04 Ubuntu 18.04 Ubuntu 16.04
latest/stable 3 01 Feb 2021
Ubuntu 22.04 Ubuntu 20.04 Ubuntu 18.04 Ubuntu 16.04
latest/candidate 33 06 May 2024
Ubuntu 22.04 Ubuntu 20.04 Ubuntu 18.04 Ubuntu 16.04
latest/candidate 9 11 Jan 2023
Ubuntu 22.04 Ubuntu 20.04 Ubuntu 18.04 Ubuntu 16.04
latest/edge 41 27 Nov 2024
Ubuntu 22.04 Ubuntu 20.04 Ubuntu 18.04 Ubuntu 16.04
latest/edge 9 11 Jan 2023
Ubuntu 22.04 Ubuntu 20.04 Ubuntu 18.04 Ubuntu 16.04
juju deploy logrotated
Show information

Platform:

Ubuntu
22.04 20.04 18.04 16.04

Learn about configurations >

  • logrotate-cronjob | boolean

    Default: True

    Enabled or disables the creation of a cronjob for the automatic updating of the logrotate files.

  • logrotate-cronjob-frequency | string

    Default: hourly

    If logrotate-cronjob is True, then this value is used to determine the location of the cronjob file. Valid options are 'hourly', 'daily', 'weekly', 'monthly'.

  • logrotate-retention | int

    Default: 30

    The logrotate retention period in days. The charm will go through ALL logrotate entries in /etc/logrotate.d/ and set the rotate config to the appropriate value, depending on the rotation interval used. For example if rotation is monthy and retention is 180 days -> rotate 6 or rotation is daily and retention is 90 days -> rotate 90 or rotation is weekly and retention is 21 days -> rotate 3 Weekly will round up the week count, for example if retention is set to 180 days -> rotate 26 (26 weeks x 7 days = 182 days) Yearly will put rotate to 1 and increase it with 1 for each 360 days.

  • override | string

    Default: []

    JSON-formatted string with override options for files in /etc/logrotate.d/ This override takes precendence over all other options. Format is: [ {"path": "/etc/logrotate.d/rotatefile", "rotate": 5, "interval": "weekly", "size": "100M"}, {}, ... ] Mind the quotes for JSON properties/values! Valid options for rotate: any integer value Valid options for interval: 'daily', 'weekly', 'monthly', 'yearly' Valid options for size: any integer value with unit suffix, for example, '100', '100k', '100M', or '100G'. Note that the size and interval are mutually exclusive, and size takes the precedence.

  • update-cron-daily-schedule | string

    Default: unset

    This value determines the time schedule with which the cron.daily job in /etc/crontab runs. This is done in order to control the execution time for the /etc/cron.daily/logrotate job. Valid options: 'unset': No change to default cron.daily schedule. 'set,HOUR:MINUTE': cron.daily schedule will be set to timestamp HOUR:MINUTE (24H) daily. 'random,START_HOUR:START_MINUTE,END_HOUR:END_MINUTE': cron.daily schedule will be set to some random value between START_HOUR:START_MINUTE,END_HOUR:END_MINUTE (24H) daily. Note that all cron.daily jobs are affected by this config. They still run once a day but according to the time specified here.