-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsolace_logrotate
83 lines (67 loc) · 2.1 KB
/
solace_logrotate
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
# Aaron's logrotate configuration file
# will keep appliance logs blah blah description
# new comment
#############################################
# global options at the top
# IMPORTANT!! Make sure your username and group matches whatever rsyslog or
# syslog-ng or whoever is creating the log files, otherwise it'll make them root,
# and then logigng will break if (e.g. user syslog) can't write to root file.
# And definitely 644 so other (regular) users can still see these files
create 644 syslog adm
#create 644 root root
# doesn't matter if there's some missing files for some reason
missingok
# compress the old log files
compress
# leave the ".1" file as uncompressed for easy searching
delaycompress
# do it only once after all rotates, not once per file
sharedscripts
# at the end of all rotates, send a SIGHUP to syslog processes to tell them
# to reattach to the new log files (otherwise they'll keep writing to the
# renamed .1 file)
postrotate
# MAKE SURE THE PATHS ARE CORRECT AND EXIST! (do a 'which killall' to verify)
/usr/bin/killall -HUP rsyslogd
/usr/bin/killall -HUP syslog-ng
# ** OR **
# /bin/killall -HUP rsyslogd
# /bin/killall -HUP syslog-ng
endscript
#############################################
# all the config changes, good for audit
/var/log/solace*/*/command.log {
size=50M
rotate 5
}
# about 1 GB of event logs, same as broker (20x 50MB)
/var/log/solace*/*/event.log {
size=100M
rotate 10
}
# I think system log is not that useful, due to my fancier alert.log
/var/log/solace*/*/system.log {
size=50M
rotate 3
}
# authentication-related logs, broken out
/var/log/solace*/*/auth.log {
size=10M
rotate 3
}
# all the "show" command logs broken out, if enabled at the broker
/var/log/solace*/*/show.log {
size=1M
rotate 3
}
# Message-VPN-specific logs, if required
# e.g. /var/log/solace/broker/vpn/event.log
/var/log/solace*/*/*/event.log {
size=5M
rotate 3
}
# across all brokers, event logs of interest for monitoring applications
/var/log/solace*/alerts.log {
size=20M
rotate 2
}