跳转到主要内容

Supervisord Slack通知器

项目描述

https://travis-ci.org/WoLpH/supervisord-slack-notifier.png?branch=master

Supervisord事件监听器,通过Web API向Slack发送通知

安装

pip install slack_notifier

测试

测试使用py.test设置,覆盖范围通过pytest-cov插件处理。

在根目录下使用py.test运行您的测试。

默认情况下运行覆盖范围,并设置在pytest.ini文件中。在运行测试后,打开htmlcov/index.html以查看覆盖范围的HTML输出。

Travis CI

有一个.travis.yml文件,设置为运行您的Python 2.7和Python 3.2测试,如果您选择使用它。

设置

将以下内容添加到supervisord.conf

[eventlistener:slack_notifier]
command=/path/to/slack_notifier -t=%AUTH_TOKEN% -c=%CHANNEL_NAME% -a
events=PROCESS_STATE

选项

-p -- specify a supervisor process_name. Notify when the process goes to
      any of the 'followed' states.  If this process is part of a group, it
      can be specified using the 'process_name:group_name' syntax.

-a -- Notify about ALL processes.  Overrides any -p
      parameters passed in the same crashmail process invocation.

-e -- follow only transitions to these events. This overrides event list in
      config.py

-c -- Channel to send notifications to. Can be either:
      '#public_channel',
      '@private_group',
      'CHANNEL_ID',

-t -- Web API auth token

-p-e选项可以指定多次,允许指定多个进程和事件。指定-a将覆盖任何对-p的选择。

许可证

在MIT许可证下发布:[https://open-source.org.cn/licenses/mit-license.php](https://open-source.org.cn/licenses/mit-license.php)

项目详情


下载文件

下载您平台上的文件。如果您不确定选择哪个,请了解有关安装包的更多信息。

源分布

slack_notifier-1.0.0.tar.gz (4.6 kB 查看哈希值)

上传于 源代码

构建分布

slack_notifier-1.0.0-py2.py3-none-any.whl (7.5 kB 查看哈希)

上传于 Python 2 Python 3

由以下支持