Skip to content

andyhky/swiftrotate

master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 

swiftrotate

Adventures in Logrotate and swift.

  • prerotate.py - Utility script which datestamps a collection of files that have been logrotated, but were rotated without dateext.
  • swiftrotate.sh - Script to add to to logrotate.conf postrotate.
  • .swiftrotate.example - Contains example configuration values required by swiftrotate.sh

Just add the full path to swiftrotate.sh to the postrotate directive.

Example logrotate configuration for fail2ban:

/var/log/fail2ban.log {
    daily
    rotate 4
    dateext
    compress

    delaycompress
    missingok
    postrotate
        fail2ban-client set logtarget /var/log/fail2ban.log >/dev/null
        /usr/local/bin/swiftrotate.sh
    endscript
    create 640 root adm
    }

Force logrotate:

	sudo /usr/sbin/logrotate -dv --force /etc/logrotate.conf

About

A couple of scripts to use to point logrotate at Swift.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published