-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathconfig.yaml
54 lines (54 loc) · 2.62 KB
/
config.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
options:
logrotate-retention:
type: int
default: 30
description: |
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.
logrotate-cronjob:
type: boolean
default: True
description: |
Enabled or disables the creation of a cronjob for the automatic updating
of the logrotate files.
logrotate-cronjob-frequency:
type: string
default: 'hourly'
description: |
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'.
update-cron-daily-schedule:
type: string
default: 'unset'
description: |
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.
override:
type: string
default: '[]'
description: |
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.