Wishlist for a cronjob output processor
See also my blog.
Well, I have a wishlist as well (of course all items should be configurable):
- Save cronjob output to a file
- Append that output to log files on the system, after applying regexp filters
- Send E-Mail to a number configurable addresses
- Have a list of regexps that the output is filtered through before being included in the e-mail
- Allow the preceding operation to be done multiple times for a single mail, allowing to include different “verbosity levels” in a single message to have the admin decide which to read
- Allow certain parts of messages to be tacced (printed with line order reversed)
- Modify message subject if certain conditions are met (for including tags like [OK], [ALERT] etc)
- Allow arbitrary texts (preferably using macro expansion) in between message parts
You can implement these features using the cron-variable “MAILTO=post-processing” and an mail-alias, which is implemented like “cron-postprocessing |/my/post/processing/script”.
– Joerg Hoh