diff options
Diffstat (limited to 'data/templates/logs')
-rw-r--r-- | data/templates/logs/logrotate/vyos-atop.j2 | 20 | ||||
-rw-r--r-- | data/templates/logs/logrotate/vyos-rsyslog.j2 | 13 |
2 files changed, 33 insertions, 0 deletions
diff --git a/data/templates/logs/logrotate/vyos-atop.j2 b/data/templates/logs/logrotate/vyos-atop.j2 new file mode 100644 index 0000000..2d078f3 --- /dev/null +++ b/data/templates/logs/logrotate/vyos-atop.j2 @@ -0,0 +1,20 @@ +/var/log/atop/atop.log { + daily + dateext + dateformat _%Y-%m-%d_%H-%M-%S + maxsize {{ max_size }}M + missingok + nocompress + nocreate + nomail + rotate {{ rotate }} + prerotate + # stop the service + systemctl stop atop.service + endscript + postrotate + # start atop service again + systemctl start atop.service + endscript +} + diff --git a/data/templates/logs/logrotate/vyos-rsyslog.j2 b/data/templates/logs/logrotate/vyos-rsyslog.j2 new file mode 100644 index 0000000..f2e4d2a --- /dev/null +++ b/data/templates/logs/logrotate/vyos-rsyslog.j2 @@ -0,0 +1,13 @@ +/var/log/messages { + create + missingok + nomail + notifempty + rotate {{ rotate }} + size {{ max_size }}M + postrotate + # inform rsyslog service about rotation + /usr/lib/rsyslog/rsyslog-rotate + endscript +} + |