Permalink
Browse files

logstash-shipper needs a kick when rotating the logs.

  • Loading branch information...
1 parent 02e0aaa commit 329e3fb8364e765306b66cfb0827e34080b7f37b Kris Buytaert committed Jan 23, 2012
Showing with 24 additions and 0 deletions.
  1. +13 −0 files/syslog.logrotate
  2. +11 −0 manifests/init.pp
@@ -0,0 +1,13 @@
+/var/log/cron
+/var/log/maillog
+/var/log/messages
+/var/log/secure
+/var/log/spooler
+{
+ sharedscripts
+ postrotate
+ /bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null || true
+ /etc/init.d/logstash-shipper restart 2> /dev/null || true
+ endscript
+}
+
View
@@ -76,6 +76,17 @@
}
+
+
+file { '/etc/logrotate.d/syslog':
+ ensure => 'file',
+ group => '0',
+ mode => '644',
+ owner => '0',
+ source => 'puppet:///modules/logstash/syslog.logrotate';
+}
+
+
}

0 comments on commit 329e3fb

Please sign in to comment.