# Chaos Toolkit Extension for Slack
[![Build Status](https://travis-ci.org/chaostoolkit-incubator/chaostoolkit-slack.svg?branch=master)](https://travis-ci.org/chaostoolkit-incubator/chaostoolkit-slack)
This project is an extension for the Chaos Toolkit to target [Slack][slack].
[slack]: https://slack.com/
## Install
This package requires Python 3.5+
To be used from your experiment, this package must be installed in the Python
environment where [chaostoolkit][] already lives.
[chaostoolkit]: https://github.com/chaostoolkit/chaostoolkit
```
$ pip install -U chaostoolkit-slack
```
## Slack Token
You can simply generate a [legacy token][legtok]. But you may also create a
full [Slack App][slackapp] and generate a [token from it][slacktok].
[legtok]: https://api.slack.com/custom-integrations/legacy-tokens
[slackapp]: https://api.slack.com/slack-apps
[slacktok]: https://api.slack.com/docs/token-types
## Usage
Currently, this extension only provides notification support to send Chaos
Toolkit events to Slack channels.
To use this extension, edit your [chaostoolkit settings][settings] by adding the
following payload:
[settings]: http://chaostoolkit.org/reference/usage/settings/
```yaml
notifications:
-
type: plugin
module: chaosslack.notification
token: xop-1235
channel: general
```
By default all events will be forwarded to that channel. You may filter only
those events you care for:
```yaml
notifications:
-
type: plugin
module: chaosslack.notification
token: xop-1235
channel: general
events:
- run-failed
- run-started
```
Only sends those two events.
## Test
To run the tests for the project execute the following:
```
$ pytest
```
## Contribute
If you wish to contribute more functions to this package, you are more than
welcome to do so. Please, fork this project, make your changes following the
usual [PEP 8][pep8] code style, sprinkling with tests and submit a PR for
review.
[pep8]: https://pycodestyle.readthedocs.io/en/latest/
The Chaos Toolkit projects require all contributors must sign a
[Developer Certificate of Origin][dco] on each commit they would like to merge
into the master branch of the repository. Please, make sure you can abide by
the rules of the DCO before submitting a PR.
[dco]: https://github.com/probot/dco#how-it-works
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
资源分类:Python库 所属语言:Python 资源全名:chaostoolkit-slack-0.2.0.tar.gz 资源来源:官方 安装方法:https://lanzao.blog.csdn.net/article/details/101784059
资源推荐
资源详情
资源评论
收起资源包目录
chaostoolkit-slack-0.2.0.tar.gz (11个子文件)
chaostoolkit-slack-0.2.0
PKG-INFO 4KB
chaosslack
__init__.py 46B
notification.py 7KB
setup.cfg 114B
chaostoolkit_slack.egg-info
PKG-INFO 4KB
requires.txt 45B
SOURCES.txt 287B
top_level.txt 11B
dependency_links.txt 1B
setup.py 2KB
README.md 2KB
共 11 条
- 1
资源评论
挣扎的蓝藻
- 粉丝: 14w+
- 资源: 15万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功