Skip to content
This repository has been archived by the owner on Aug 8, 2018. It is now read-only.

shift31/supervisor-event-notifier

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Supervisor Event Notifier (SEN)

An event listener for Supervisor, which can send event notifications to various systems. HipChat and VictorOps are currently supported.

System Requirements

  • Supervisord
  • PHP >= 5.4

Installation

Download sen.phar, copy to /usr/local/sbin, set executable permissions, and optionally rename to sen.

Configuration

Supervisor

Add the following to your supervisor.conf or in /etc/supervisor/conf.d/sen.conf, customizing as desired:

[eventlistener:sen]
command=/usr/local/sbin/sen
process_name=sen
numprocs=1
events=PROCESS_STATE
stdout_logfile=/var/log/supervisor/sen-out.log
stderr_logfile=/var/log/supervisor/sen-err.log

SEN

Create /etc/supervisor-event-notifier.json. Here's an example:

{
  "handlers": {
    "HipChatExample": {
      "type": "HipChat",
      "authToken": "YOUR_APIv2_AUTH_TOKEN",
      "room": "ROOM_ID_OR_NAME"
    },
    "VictorOpsExample": {
      "type": "VictorOps",
      "endpointUrl": "ENDPOINT_URL",
      "routingKey": "Supervisor"
    }
  },

  "events": {
    "PROCESS_STATE_FATAL": {
      "handlers": [
        "HipChatExample",
        "VictorOpsExample"
      ]
    },
    "PROCESS_STATE_BACKOFF": {
      "handlers": [
        "HipChatExample"
      ]
    }
  }
}

About

Sends notifications for Supervisor events

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages