[PLUG-TALK] rsyslog post-process for mailing
Randy Bush
randy at psg.com
Tue Aug 3 17:37:35 UTC 2021
most of our systems are debian, but a few ubuntu.
`/etc/logrotate.d/rsyslog` has, for example,
/var/log/syslog
{
rotate 7
daily
missingok
notifempty
delaycompress
compress
mailfirst
mail root
postrotate
/usr/lib/rsyslog/rsyslog-rotate
endscript
}
i want to grep cruft out before mailing. on freebsd, i hack
`/etc/daily.local`
/usr/bin/gunzip -c /var/log/messages.0.gz | \
/usr/bin/egrep -iv 'blorp de blorp' | \
/usr/bin/Mail -s "`hostname` System Log" root
is there a conventional way to do it on deb/ubu?
randy
More information about the PLUG-talk
mailing list