diff options
author | Christian Poessinger <christian@poessinger.com> | 2021-12-17 20:08:28 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-17 20:08:28 +0100 |
commit | da3e558992df5f155083e4b0fe9645381d8b2cd1 (patch) | |
tree | 45a749f865b7cc5d7295710245a50dd88eb66d38 /data/templates | |
parent | bccb6398ed289c1f16ffd677d317b0f49711a8e5 (diff) | |
parent | 86bbab75ae414f19305970e2aa8aaeb05e6990ae (diff) | |
download | vyos-1x-da3e558992df5f155083e4b0fe9645381d8b2cd1.tar.gz vyos-1x-da3e558992df5f155083e4b0fe9645381d8b2cd1.zip |
Merge pull request #1103 from zdc/T3774-sagitta
logs: T3774: Added CLI options to control atop logs rotation
Diffstat (limited to 'data/templates')
-rw-r--r-- | data/templates/logs/logrotate/vyos-atop.tmpl | 20 | ||||
-rw-r--r-- | data/templates/logs/logrotate/vyos-rsyslog.tmpl | 13 |
2 files changed, 33 insertions, 0 deletions
diff --git a/data/templates/logs/logrotate/vyos-atop.tmpl b/data/templates/logs/logrotate/vyos-atop.tmpl new file mode 100644 index 000000000..2d078f379 --- /dev/null +++ b/data/templates/logs/logrotate/vyos-atop.tmpl @@ -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.tmpl b/data/templates/logs/logrotate/vyos-rsyslog.tmpl new file mode 100644 index 000000000..f2e4d2ab2 --- /dev/null +++ b/data/templates/logs/logrotate/vyos-rsyslog.tmpl @@ -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 +} + |