Supervisord and crashmail configuration

supervisord

I want to be notified when a supervisord process changes state. I think I have configured it correctly but it is not working: when I change the status of a process (i.e. start/stop) I receive no email, and see no signal of malfunctioning.

Here is supervisor configuration:

[eventlistener:crashmail]
command=/usr/local/bin/crashmail -a -m my_email@gmail.com
events=PROCESS_STATE

supervisor status tells me that crashmail is RUNNING:

crashmail                        RUNNING    pid 54227, uptime 0:11:50
other                            RUNNING    pid 54229, uptime 0:11:49
someother                        RUNNING    pid 54267, uptime 0:10:59

In the stdout log of crashmail I find something like:

READY
RESULT 2
OKREADY
RESULT 2
OKREADY
READY
RESULT 2
OKREADY
READY
READY

and the stderr is empty. I tried to start/stop other processes without any result.

Seems to me that supervisord is not sending events to crashmail… how can I check this?

Best Answer

If you changing processes status via 'supervisorctl stop your_process' crashmail doesn't send you email. You should get PID of your_process and just kill it - then you will get email about changed process state.