Saltstack Official Logrotate Formula
Du kan inte välja fler än 25 ämnen
Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
|
- # -*- coding: utf-8 -*-
- # vim: ft=yaml
- ---
- logrotate:
- # default OS values can be overridden in 'lookup' dict
- # lookup:
- # pkg: logrotate
- # service: crond
- default_config:
- weekly: true
- rotate: 52
- create: true
- compress: true
- dateext: true
- jobs:
- /tmp/var/log/mysql/error:
- config:
- - weekly
- - missingok
- - rotate 52
- - compress
- - delaycompress
- - notifempty
- - create 640 root adm
- - sharedscripts
- mysql:
- path:
- - /tmp/var/log/mysql/*.log
- config:
- - weekly
- - missingok
- - rotate 52
- - compress
- - delaycompress
- - notifempty
- - create 640 root adm
- - sharedscripts
- syslog:
- path:
- - /var/log/cron
- - /var/log/maillog
- - /var/log/messages
- - /var/log/secure
- - /var/log/spooler
- - /var/log/slapd.log
- config:
- - sharedscripts
- - postrotate
- - /bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null || true
- - endscript
- nginx:
- contents: |
- /var/log/nginx/*.log{
- weekly
- missingok
- compress
- delaycompress
- notifempty
- create 0640 www-data adm
- sharedscripts
- prerotate
- if [ -d /etc/logrotate.d/httpd-prerotate ]; then \
- run-parts /etc/logrotate.d/httpd-prerotate; \
- fi \
- endscript
- postrotate
- invoke-rc.d nginx rotate >/dev/null 2>&1
- endscript
- }
|