Start log rolling for docker containers too. Fix logrotate for other daemons.

This commit is contained in:
Brendan Burns 2014-09-11 15:47:06 -07:00
parent 9d88288ab5
commit 76c0ce374d
3 changed files with 20 additions and 1 deletions

View File

@ -4,7 +4,7 @@
missingok
notifempty
compress
maxsize 100m
maxsize 100M
daily
create 0644 root root
}

View File

@ -0,0 +1,10 @@
/var/lib/docker/containers/*/*-json.log {
rotate 5
copytruncate
missingok
notifempty
compress
maxsize 10M
daily
create 0644 root root
}

View File

@ -16,6 +16,15 @@ logrotate:
file: {{ file }}
{% endfor %}
/etc/logrotate.d/docker:
file:
- managed
- source: salt://logrotate/docker
- template: jinja
- user: root
- group: root
- mode: 644
/etc/cron.hourly/logrotate:
file:
- managed