-
Notifications
You must be signed in to change notification settings - Fork 71
/
pillar.example
97 lines (97 loc) · 2.26 KB
/
pillar.example
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# -*- 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
a_monthly_job:
path:
- /tmp/var/log/a_service/*.log
config:
- monthly
- missingok
- rotate 12
- 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_high_traf:
path:
- /var/log/nginx_high_traf/*.log
config:
- hourly
- missingok
- rotate {{ 30 * 24 }} # keep 1 month's worth of hourly logs
- compress
- notifempty
- dateext
- dateformat .%Y-%m-%d-%H00
- olddir /var/log/nginx_high_traf/archive
- sharedscripts
- postrotate
- 'kill -USR1 $(cat /var/run/nginx_high_traf.pid)'
- 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
}