Supervisor Event Notification

Source: Internet
Author: User
Tags webhook
This is a creation in Article, where the information may have evolved or changed.

Supervisor-event-listener

Supervisor Event notification, mail support, Slack, WebHook

Brief introduction

Supervisor is a process management tool in the *NIX environment that transforms the foreground process into a daemon and restarts automatically when the process exits unexpectedly.
The Supervisor-event-listener listens for a process exception exit event and sends a notification.

Project Address

Supervisor-event-listener

Supervisor Configuration

[eventlistener:supervisor-event-listener]; 默认读取配置文件/etc/supervisor-event-listener.inicommand=/path/to/supervisor-event-listener; 指定配置文件路径;command=/path/to/supervisor-event-listener -c /path/to/supervisor-event-listener.inievents=PROCESS_STATE_EXITED......

configuration file, default read/etc/supervisor-event-listener.ini

[default]# 通知类型 mail,slack,webhook 只能选择一种notify_type = mail# 邮件服务器配置mail.server.user = test@163.commail.server.password = 123456mail.server.host = smtp.163.commail.server.port = 25# 邮件收件人配置, 多个收件人, 逗号分隔mail.user = hello@163.com# Slack配置slack.webhook_url = https://hooks.slack.com/services/xxxx/xxx/xxxxslack.channel = exception# WebHook通知URL配置 webhook_url = http://my.webhook.com

Notification content

Mail, Slack

Host: ip(hostname)Process: process-namePID: 6152EXITED FROM state: RUNNING

WebHook, POST request, field meaning View supervisor document

 {"Header": {"Ver": "3.0", "Server": "Supervisor", "Serial": One, "Pool": "Supervisor -listener "," poolserial ": One," EventName ":" process_state_exited "," Len ": +," Payload ": {" IP ":" IP "(hostn AME) "," ProcessName ":" Process-name "," GroupName ":" Group-name "," fromstate ":" RUNNING "," expected ": 0," Pi D ": 6371}}  
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.