]> Frank Brehm's Git Trees - pixelpark/hiera.git/commitdiff
MBDIALOGE-558-added logrotate
authorThomas Heller <thomas.heller@pixelpark.com>
Tue, 18 Sep 2018 14:00:43 +0000 (16:00 +0200)
committerThomas Heller <thomas.heller@pixelpark.com>
Tue, 18 Sep 2018 14:00:43 +0000 (16:00 +0200)
customer/mbvd-dialogapi/common.yaml

index c4c09db0c1aaad9d20fae9b864d28b334bbcb382..5f7230a22fa88f7988db084f5046ebd2ce54c31c 100644 (file)
@@ -4,11 +4,67 @@ infra::additional_classes:
   - infra::profile::mysql_server
   - infra::profile::postfix
   - infra::profile::cron
+  - infra::profile::logrotate
 
 postfix::myorigin: "pixelpark.net"
 infra::profile::postfix::virtual_aliases_source: 'maps/virtual-nullclient-mbvd'
 infra::profile::postfix::cert_servername: 'wildcard.pixelpark.net'
 
+infra::profile::logrotate::rules:
+  btmp:
+    dateformat: '-%Y-%m-%d'
+  wtmp:
+    dateformat: '-%Y-%m-%d'
+  syslog:
+    path:
+      - '/var/log/cron'
+      - '/var/log/maillog'
+      - '/var/log/messages'
+      - '/var/log/secure'
+      - '/var/log/spooler'
+    rotate_every: 'day'
+    rotate: 10
+    minsize: '4M'
+    compress: true
+    delaycompress: true
+    dateformat: '-%Y-%m-%d'
+    missingok: true
+    sharedscripts: true
+    postrotate: '/bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null || true'
+  passenger:
+    path:
+      - '/var/log/passenger-analytics/*.log'
+    missingok: true
+    ifempty: false
+    sharedscripts: true
+    compress: true
+    delaycompress: true
+  dialog:
+    path:
+      - '/var/www/dialogapi/log/*.log'
+    su_owner: 'dialogapi'
+    su_group: 'dialogapi'
+    rotate_every: 'day'
+    missingok: true
+    rotate: 20
+    minsize: '4M'
+    dateext: true
+    compress: true
+    delaycompress: true
+    ifempty: false
+    copytruncate: true
+  httpd:
+    path:
+      - '/var/log/httpd/*log'
+    rotate: 10
+    rotate_every: 'day'
+    missingok: true
+    ifempty: false
+    sharedscripts: true
+    delaycompress: true
+    minsize: '4M'
+    postrotate: '/bin/systemctl reload httpd.service > /dev/null 2>/dev/null || true'
+
 accounts::users:
   deploy.hamburg:
     uid: 60201