We have an use case that we need to compress a logfile when it is rotated.
More specifically we have the auditd audit trail that is rotated based on size...
So when the size of the logfile reaches 100M it will rotate and the following is added to
Audit daemon rotating log files with keep option
I would like, when this line is logged, that a script is executed that would compress the file
audit.log.1 that has been created.
omprog to be the best way to do this unless there is something better.
the documentation on omprog is not very clear.. is what I want possible with rsyslog or another type of daemon who monitors the filesystem and upon the presence of a file it will trigger a compress script?