crashmail is a supervisor “event listener”, intended to be
PROCESS_STATE_EXITED events. When crashmail
receives that event, and the transition is “unexpected”, crashmail
sends an email notification to a configured address.
crashmail is incapable of monitoring the process status of processes which are not supervisord child processes.
crashmail is a “console script” installed when you install
superlance. Although crashmail 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.
$ crashmail [-p processname] [-a] [-o string] [-m mail_address] \ [-s sendmail]
Send mail when the specified supervisord child process transitions unexpectedly to the
This option can be provided more than once to have crashmail monitor more than one program.
To monitor a process which is part of a supervisord group, specify its name as
Send mail when any supervisord child process transitions unexpectedly to the
-pparameters passed in the same crashmail process invocation.
Specify a parameter used as a prefix in the mail Subject header.
Specify the sendmail command to use to send email.
Must be a command which accepts header and message data on stdin and sends mail. Default is
/usr/sbin/sendmail -t -i.
Specify an email address to which crash notification messages are sent. If no email address is specified, email will not be sent.
Configuring crashmail Into the Supervisor Config¶
[eventlistener:x] section must be placed in
in order for crashmail to do its work. See the “Events” chapter in
the Supervisor manual for more information about event listeners.
The following example assumes that crashmail is on your system
[eventlistener:crashmail] command=crashmail -p program1 -p group1:program2 -m email@example.com events=PROCESS_STATE_EXITED