diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/conf/etc/logrotate.conf | 133 | ||||
-rw-r--r-- | tools/conf/etc/logrotate.d/dnsmasq | 11 | ||||
-rw-r--r-- | tools/conf/etc/logrotate.d/fail2ban | 5 | ||||
-rw-r--r-- | tools/conf/etc/logrotate.d/gitolite | 12 | ||||
-rw-r--r-- | tools/conf/etc/logrotate.d/lynis | 10 | ||||
-rw-r--r-- | tools/conf/etc/logrotate.d/nginx | 23 | ||||
-rw-r--r-- | tools/conf/etc/logrotate.d/ntp | 5 | ||||
-rw-r--r-- | tools/conf/etc/logrotate.d/php-fpm | 5 | ||||
-rw-r--r-- | tools/conf/etc/logrotate.d/postgres | 17 | ||||
-rw-r--r-- | tools/conf/etc/logrotate.d/samhain | 24 | ||||
-rw-r--r-- | tools/conf/etc/logrotate.d/shorewall | 11 | ||||
-rw-r--r-- | tools/conf/etc/logrotate.d/shorewall6 | 5 |
12 files changed, 261 insertions, 0 deletions
diff --git a/tools/conf/etc/logrotate.conf b/tools/conf/etc/logrotate.conf new file mode 100644 index 0000000..896b779 --- /dev/null +++ b/tools/conf/etc/logrotate.conf @@ -0,0 +1,133 @@ +# see "man logrotate" for details +# rotate log files weekly +weekly + +# keep 4 weeks worth of backlogs +rotate 4 + +# create new (empty) log files after rotating old ones +create + +# uncomment this if you want your log files compressed +compress + +olddir /var/log/old + +notifempty + +maxsize 5M + +# some packages can drop log rotation information into +# this directory +include /etc/logrotate.d + +# few generic files to rotate +/var/log/wtmp { + create 0644 root root + rotate 5 +} + +/var/log/btmp { + create 0600 root root + rotate 5 +} + +# system-specific logs may be also be configured here. +/var/log/faillog { + maxsize 5M +} + +/var/log/lastlog { + maxsize 5M +} + +/var/log/auth { + create 0644 root root + rotate 5 + sharedscripts + postrotate + if [ -f /var/run/syslog-ng.pid ]; then \ + kill -HUP `cat /var/run/syslog-ng.pid`; \ + fi; + endscript +} + +/var/log/cron { + create 0644 root root + rotate 5 + sharedscripts + postrotate + if [ -f /var/run/syslog-ng.pid ]; then \ + kill -HUP `cat /var/run/syslog-ng.pid`; \ + fi; + endscript +} + +/var/log/debug { + create 0644 root root + rotate 5 + sharedscripts + postrotate + if [ -f /var/run/syslog-ng.pid ]; then \ + kill -HUP `cat /var/run/syslog-ng.pid`; \ + fi; + endscript +} + +/var/log/kernel { + rotate 5 + create 0644 root root + sharedscripts + postrotate + if [ -f /var/run/syslog-ng.pid ]; then \ + kill -HUP `cat /var/run/syslog-ng.pid`; \ + fi; + endscript +} + +/var/log/daemon { + compress + rotate 5 + create 644 root root + sharedscripts + postrotate + if [ -f /var/run/syslog-ng.pid ]; then \ + kill -HUP `cat /var/run/syslog-ng.pid`; \ + fi; + endscript + +} + +/var/log/messages { + rotate 5 + create 0644 root root + sharedscripts + postrotate + if [ -f /var/run/syslog-ng.pid ]; then \ + kill -HUP `cat /var/run/syslog-ng.pid`; \ + fi; + endscript +} + +/var/log/mail { + create 0644 root root + rotate 5 + sharedscripts + postrotate + if [ -f /var/run/syslog-ng.pid ]; then \ + kill -HUP `cat /var/run/syslog-ng.pid`; \ + fi; + endscript +} + +/var/log/user { + create 0644 root root + rotate 5 + sharedscripts + postrotate + if [ -f /var/run/syslog-ng.pid ]; then \ + kill -HUP `cat /var/run/syslog-ng.pid`; \ + fi; + endscript +} + diff --git a/tools/conf/etc/logrotate.d/dnsmasq b/tools/conf/etc/logrotate.d/dnsmasq new file mode 100644 index 0000000..3151ddc --- /dev/null +++ b/tools/conf/etc/logrotate.d/dnsmasq @@ -0,0 +1,11 @@ +/var/log/dnsmasq { + weekly + create 0644 root root + rotate 5 + sharedscripts + postrotate + if [ -f /var/run/syslog-ng.pid ]; then \ + kill -HUP `cat /var/run/syslog-ng.pid`; \ + fi; + endscript +} diff --git a/tools/conf/etc/logrotate.d/fail2ban b/tools/conf/etc/logrotate.d/fail2ban new file mode 100644 index 0000000..c2dc4cd --- /dev/null +++ b/tools/conf/etc/logrotate.d/fail2ban @@ -0,0 +1,5 @@ +/var/log/fail2ban.log { + weekly + create 0644 root root + rotate 5 + } diff --git a/tools/conf/etc/logrotate.d/gitolite b/tools/conf/etc/logrotate.d/gitolite new file mode 100644 index 0000000..547d6b6 --- /dev/null +++ b/tools/conf/etc/logrotate.d/gitolite @@ -0,0 +1,12 @@ +/var/log/gitolite { + rotate 5 + monthly + create 0644 root root + sharedscripts + postrotate + if [ -f /var/run/syslog-ng.pid ]; then \ + kill -HUP `cat /var/run/syslog-ng.pid`; \ + fi; + endscript + +} diff --git a/tools/conf/etc/logrotate.d/lynis b/tools/conf/etc/logrotate.d/lynis new file mode 100644 index 0000000..8cf9181 --- /dev/null +++ b/tools/conf/etc/logrotate.d/lynis @@ -0,0 +1,10 @@ +/var/log/lynis.log { + rotate 5 + monthly + create 0644 root root +} +/var/log/lynis-report.dat { + rotate 5 + monthly + create 0644 root root +} diff --git a/tools/conf/etc/logrotate.d/nginx b/tools/conf/etc/logrotate.d/nginx new file mode 100644 index 0000000..ae05445 --- /dev/null +++ b/tools/conf/etc/logrotate.d/nginx @@ -0,0 +1,23 @@ +/var/log/nginx/access.log { + weekly + create 0664 root www + rotate 5 + sharedscripts + postrotate + if [ -f /var/run/syslog-ng.pid ]; then \ + kill -HUP `cat /var/run/syslog-ng.pid`; \ + fi; + endscript +} + +/var/log/nginx/error.log { + weekly + create 0644 root root + rotate 5 + sharedscripts + postrotate + if [ -f /var/run/syslog-ng.pid ]; then \ + kill -HUP `cat /var/run/syslog-ng.pid`; \ + fi; + endscript +} diff --git a/tools/conf/etc/logrotate.d/ntp b/tools/conf/etc/logrotate.d/ntp new file mode 100644 index 0000000..c46b590 --- /dev/null +++ b/tools/conf/etc/logrotate.d/ntp @@ -0,0 +1,5 @@ +/var/log/ntp.log { + weekly + create 0644 root root + rotate 5 +} diff --git a/tools/conf/etc/logrotate.d/php-fpm b/tools/conf/etc/logrotate.d/php-fpm new file mode 100644 index 0000000..c778658 --- /dev/null +++ b/tools/conf/etc/logrotate.d/php-fpm @@ -0,0 +1,5 @@ +/var/log/php-fpm.log { + rotate 5 + monthly + create 0644 root root +} diff --git a/tools/conf/etc/logrotate.d/postgres b/tools/conf/etc/logrotate.d/postgres new file mode 100644 index 0000000..fc59aad --- /dev/null +++ b/tools/conf/etc/logrotate.d/postgres @@ -0,0 +1,17 @@ +/var/log/pgsql { + weekly + compress + delaycompress + rotate 10 + notifempty + create 660 postgres postgres + sharedscripts + postrotate + if [ -f /var/run/syslog-ng.pid ]; then \ + kill -HUP `cat /var/run/syslog-ng.pid`; \ + fi; + endscript + +} + + diff --git a/tools/conf/etc/logrotate.d/samhain b/tools/conf/etc/logrotate.d/samhain new file mode 100644 index 0000000..d60f810 --- /dev/null +++ b/tools/conf/etc/logrotate.d/samhain @@ -0,0 +1,24 @@ +/var/log/samhain.log { + weekly + rotate 52 + nocreate + missingok + compress + + prerotate + if test -f /var/run/samhain.pid; then \ + PIN=`cat /var/run/samhain.pid`; \ + /bin/kill -TTIN $PIN; \ + sleep 1; \ + AA=0; \ + while test "x$AA" != "x120"; do \ + AA=$(( AA + 1 )); \ + if test -f /var/log/samhain.log.lock; then \ + sleep 1; \ + else \ + break; \ + fi \ + done; \ + fi + endscript +} diff --git a/tools/conf/etc/logrotate.d/shorewall b/tools/conf/etc/logrotate.d/shorewall new file mode 100644 index 0000000..a7dffdf --- /dev/null +++ b/tools/conf/etc/logrotate.d/shorewall @@ -0,0 +1,11 @@ +/var/log/shorewall-init.log { + missingok + notifempty + create 0600 root root + sharedscripts + postrotate + if [ -f /var/run/syslog-ng.pid ]; then \ + kill -HUP `cat /var/run/syslog-ng.pid`; \ + fi; + endscript +} diff --git a/tools/conf/etc/logrotate.d/shorewall6 b/tools/conf/etc/logrotate.d/shorewall6 new file mode 100644 index 0000000..ee5e246 --- /dev/null +++ b/tools/conf/etc/logrotate.d/shorewall6 @@ -0,0 +1,5 @@ +/var/log/shorewall6-init.log { + missingok + notifempty + create 0600 root root +} |