On Oct 27, 2011, at 1:29 PM, David Nicol wrote: > I'd like to trigger logrotate to run off its schedule in the unlikely event > that rsyslog gets a DISK FULL error while appending to a log. > > I haven't found any documentation of handling exceptions in the man page, > documentation, or wiki.
Thinking outside of rsyslog, you *could* write a script to use via omprog, and then set up a filter so that any "DISK FULL" error gets logged to that script. Then, if the script ever receives input via the omprog action, it could simply trigger logrotate to do its thing. No patching to rsyslog required. Heck, you don't even need to use omprog, you could use the traditional pipe action: :msg, contains, "DISK FULL" |/usr/local/bin/kick_logrotate Obviously, you'd need to tune the rule to the actual error message rsyslog emits if it's not "DISK FULL", but that'll get you most of the way there. Gregory -- Gregory K. Ruiz-Ade <[email protected]> OpenPGP Key ID: EAF4844B keyserver: pgpkeys.mit.edu _______________________________________________ rsyslog mailing list http://lists.adiscon.net/mailman/listinfo/rsyslog http://www.rsyslog.com

