aboutsummaryrefslogtreecommitdiffhomepage
path: root/templates/logrotate-postgresql-common.j2
diff options
context:
space:
mode:
Diffstat (limited to 'templates/logrotate-postgresql-common.j2')
-rw-r--r--templates/logrotate-postgresql-common.j216
1 files changed, 16 insertions, 0 deletions
diff --git a/templates/logrotate-postgresql-common.j2 b/templates/logrotate-postgresql-common.j2
new file mode 100644
index 0000000..06245b6
--- /dev/null
+++ b/templates/logrotate-postgresql-common.j2
@@ -0,0 +1,16 @@
1{{ postgres_log_dir|default('/var/log/postgresql') }}/*.log
2{
3 daily
4 rotate 60
5 copytruncate
6 delaycompress
7 compress
8 notifempty
9 missingok
10 su root root
11{% if postgres_pgbadger_server is defined and postgres_pgbadger_server %}
12 lastaction
13 /root/scripts/pgBadger.sh
14 endscript
15{% endif -%}
16}