diff options
author | zsdc <taras@vyos.io> | 2021-12-07 22:41:27 +0200 |
---|---|---|
committer | zsdc <taras@vyos.io> | 2021-12-07 22:44:34 +0200 |
commit | ac73200e4f0cf4020dfcd0a11e6004bca479253f (patch) | |
tree | c5478ea432686c46d2a17913828efd573185faa7 /data/templates/logs/logrotate | |
parent | 7ac6b589e3827ea6ff8e796bb6617c021cf26bca (diff) | |
download | vyos-1x-ac73200e4f0cf4020dfcd0a11e6004bca479253f.tar.gz vyos-1x-ac73200e4f0cf4020dfcd0a11e6004bca479253f.zip |
logs: T3774: Added CLI options to control atop logs rotation
Added CLI options to generate logrotate configuration file for atop logs
Diffstat (limited to 'data/templates/logs/logrotate')
-rw-r--r-- | data/templates/logs/logrotate/vyos-atop.tmpl | 20 |
1 files changed, 20 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..797bf237f --- /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 {{ maxsize|default('10') }}M + missingok + nocompress + nocreate + nomail + rotate {{ rotate|default('10') }} + prerotate + # stop the service + systemctl stop atop.service + endscript + postrotate + # start atop service again + systemctl start atop.service + endscript +} + |