crashmailbatch is a supervisor “event listener”, intended to be
TICK_60 events. It monitors
all processes running under a given supervisord instance.
Similar to crashmail, crashmailbatch sends email alerts when processes die unexpectedly. The difference is that all alerts generated within the configured time interval are batched together to avoid sending too many emails.
crashmailbatch is a “console script” installed when you install
superlance. Although crashmailbatch is an executable
program, it isn’t useful as a general-purpose script: it must be run as a
supervisor event listener to do anything useful.
$ crashmailbatch --toEmail=<email address> --fromEmail=<email address> \ [--interval=<batch interval in minutes>] [--subject=<email subject>] \ [--tickEvent=<event name>]
Specify an email address to which crash notification messages are sent.
Specify an email address from which crash notification messages are sent.
Specify the time interval in minutes to use for batching notifcations. Defaults to 1.0 minute.
Override the email subject line. Defaults to “Crash alert from supervisord”
Override the TICK event name. Defaults to “TICK_60”
Configuring crashmailbatch Into the Supervisor Config¶
[eventlistener:x] section must be placed in
in order for crashmailbatch to do its work. See the “Events” chapter in
the Supervisor manual for more information about event listeners.
The following example assumes that crashmailbatch is on your system
[eventlistener:crashmailbatch] command=crashmailbatch --toEmail="firstname.lastname@example.org" --fromEmail="email@example.com" events=PROCESS_STATE,TICK_60