Skip to content

listen supervisor event and send message to slack channel to monitor process and supervisor

Notifications You must be signed in to change notification settings

631068264/superslack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

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

效果图

About

listen supervisor event and send message to slack channel to monitor process and supervisor

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages