Supervisord Slack通知器
项目描述
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的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 737e58ce057a83283dbbdb3b914b435a1f0552fe22936f7c9ffdaf8f817eea61 |
|
MD5 | c518736c34f9f67194171565d1b8c664 |
|
BLAKE2b-256 | 4279fa6cf2e553cf433e5eb19a8efd35507e7816fb80a5b8f99b807cb87f63e8 |
关闭
slack_notifier-1.0.0-py2.py3-none-any.whl的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 38069e001c19f1fe04ef42b3b14f80b2efcb9826d04e23fdf2ff19e1e11d8e73 |
|
MD5 | d5f76b8347c8231f146fdb0ebaa79e8f |
|
BLAKE2b-256 | fc8bdeba83857638f716f7437cfbc73ed16cd3b04199277e06bf9e44d47183cc |