centos7安装supervisor参考https://www.jianshu.com/p/38befdf4ace7
配置参考官网http://supervisord.org/
supervisor的事件管理插件superlance的安装参考https://www.cnblogs.com/binglansky/p/9246780.html
superlance的配置参考文档https://superlance.readthedocs.io/en/latest/crashmail.html
阿里云服务器搭建邮件服务器(阿里云默认不开放25端口了,所以导致部分邮件发送方式不能用)参考http://morecoder.com/article/1145496.html
我的superlance配置的发送邮件命令将
crashmail
-
a
-
s
"/usr/bin/sendemail -f xxxxxx@163.com -t xxxxxx@qq.com -s smtp.163.com -u 'nginx' -xu xxxxxxx@163.com -xp xxxxxxxx -m"
-
m xxxxxxxx@qq.com
修改为crashmail -a -s "echo '[IP]服务器 有进程退出,请及时检查问题!' | mail -s '告警' xxxx@qq.com" -m xxxx@qq.com