监督松弛通知程序

slack_notifier的Python项目详细描述


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

通过web api向slack发送通知的supervisord事件侦听器

安装

pip install slack_notifier

测试

使用py.test设置测试,并使用pytest cov处理覆盖率 插件。

使用根目录中的py.test运行测试。

覆盖率默认运行,并在pytest.ini文件中设置。 要查看覆盖率的HTML输出,请在运行测试后打开htmlcov/index.html

特拉维斯ci

有一个.travis.yml文件被设置为运行Python2.7的测试 以及python 3.2,如果您选择使用它的话。

设置

在supervisord.conf中添加以下内容

[eventlistener:slack_notifier]command=/path/to/slack_notifier -t=%AUTH_TOKEN% -c=%CHANNEL_NAME% -aevents=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

许可证

在麻省理工学院的许可下发布:http://www.opensource.org/licenses/mit-license.php

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
用户界面java,使用gui连接到另一台计算机/服务器的文件系统   运行sbt的ubuntu返回错误:“javahome需要<path>参数”   java如何在Android中处理许多ImageView而不出现内存问题?   查询中非法字符的java相同URL失败   安卓取消引用可能会产生“java”。lang.NullPointerException'   java中的indexoutofboundsexception“java.lang.ArrayIndexOutOfBoundsException”错误   xml Java将dom保存到文件>文件在程序结束后由另一个进程打开   Java的垃圾收集器是如何工作的?   Java如何筛选值(列表)   java处理字符串我怎样才能像在真实的书籍中一样在上面部分生成“小数字”呢?   java SonarQube是否有一个API来获取所有项目分析的一部分?   java startActivity(intent)什么都不做   JAVAutil。扫描器类Java   java如何从Firebase更新电子邮件?UpdateMail方法已被弃用   java Hibernate。如何正确组织带有注释的onetomany关系?   在java中获得卷标和驱动器号之间的映射(而不是FileSystemView)的解决方法是什么   java查找文件的路径