Skip to content

Latest commit

 

History

History
28 lines (20 loc) · 873 Bytes

README.md

File metadata and controls

28 lines (20 loc) · 873 Bytes

Supervisor slack 监控: 使用slack接收supervisor event

This is the supervisor conf

[eventlistener:superslack]

command = python super_slack.py
directory = xxxx
user = fibo
autostart = true
autorestart = true
startsecs = 5
startretries = 3
events = PROCESS_STATE_RUNNING,PROCESS_STATE_EXITED,PROCESS_STATE_STOPPED,PROCESS_STATE_FATAL,SUPERVISOR_STATE_CHANGE
stderr_logfile = xxxx.log

super_slack.py just like a demo. If you want to use it relpace the method from from base import util or modify it if you like.

About webhook:

  • Install Incoming WebHooks on a channel
  • Put the webhook url to the script or use it modify my script and use it like python super_slack.py -w xxx
  • To get more info about supervisor event

效果图