Giter Site home page Giter Site logo

chaostoolkit-slack's People

Contributors

devatoria avatar dmartin35 avatar lawouach avatar russmiles avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

datadog

chaostoolkit-slack's Issues

Plugin not found

I'm getting could not find Python plugin 'chaosslack.notification' for notification when trying to send a notification from a container based on the image defined in https://github.com/vfarcic/chaostoolkit-container-image/blob/master/Dockerfile.

I double-checked that the plugin is installed.

pip install -U chaostoolkit-slack
Requirement already up-to-date: chaostoolkit-slack in /usr/local/lib/python3.8/site-packages (0.2.0)
Requirement already satisfied, skipping upgrade: slackclient in /usr/local/lib/python3.8/site-packages (from chaostoolkit-slack) (2.5.0)
Requirement already satisfied, skipping upgrade: logzero in /usr/local/lib/python3.8/site-packages (from chaostoolkit-slack) (1.5.0)
Requirement already satisfied, skipping upgrade: chaostoolkit-lib>=0.15.0 in /usr/local/lib/python3.8/site-packages (from chaostoolkit-slack) (1.8.1)
Requirement already satisfied, skipping upgrade: aiohttp>3.5.2 in /usr/local/lib/python3.8/site-packages (from slackclient->chaostoolkit-slack) (3.6.2)
Requirement already satisfied, skipping upgrade: pyyaml>=3.13 in /usr/local/lib/python3.8/site-packages (from chaostoolkit-lib>=0.15.0->chaostoolkit-slack) (5.3.1)
Requirement already satisfied, skipping upgrade: requests>=2.21 in /usr/local/lib/python3.8/site-packages (from chaostoolkit-lib>=0.15.0->chaostoolkit-slack) (2.23.0)
Requirement already satisfied, skipping upgrade: multidict<5.0,>=4.5 in /usr/local/lib/python3.8/site-packages (from aiohttp>3.5.2->slackclient->chaostoolkit-slack) (4.7.5)
Requirement already satisfied, skipping upgrade: yarl<2.0,>=1.0 in /usr/local/lib/python3.8/site-packages (from aiohttp>3.5.2->slackclient->chaostoolkit-slack) (1.4.2)
Requirement already satisfied, skipping upgrade: chardet<4.0,>=2.0 in /usr/local/lib/python3.8/site-packages (from aiohttp>3.5.2->slackclient->chaostoolkit-slack) (3.0.4)
Requirement already satisfied, skipping upgrade: attrs>=17.3.0 in /usr/local/lib/python3.8/site-packages (from aiohttp>3.5.2->slackclient->chaostoolkit-slack) (19.3.0)
Requirement already satisfied, skipping upgrade: async-timeout<4.0,>=3.0 in /usr/local/lib/python3.8/site-packages (from aiohttp>3.5.2->slackclient->chaostoolkit-slack) (3.0.1)
Requirement already satisfied, skipping upgrade: idna<3,>=2.5 in /usr/local/lib/python3.8/site-packages (from requests>=2.21->chaostoolkit-lib>=0.15.0->chaostoolkit-slack) (2.9)
Requirement already satisfied, skipping upgrade: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /usr/local/lib/python3.8/site-packages (from requests>=2.21->chaostoolkit-lib>=0.15.0->chaostoolkit-slack) (1.25.8)
Requirement already satisfied, skipping upgrade: certifi>=2017.4.17 in /usr/local/lib/python3.8/site-packages (from requests>=2.21->chaostoolkit-lib>=0.15.0->chaostoolkit-slack) (2019.11.28)
cat /root/.chaostoolkit/settings.yaml

[token removed from the output]

notifications:
- type: plugin
  module: chaosslack.notification
  token: xoxb-...
  channel: tests

Any idea what might be wrong?

Notifications not being sent to slack

Hi, I'm trying to send notifications to slack when an experiment starts, ends, fails, etc. I installed chaostoolkit-slack on my kubernetes environment (using the chaos toolkit kubernetes operator). When I run an experiment, I don't get any notification on slack and I don't see any error in the logs either.

This is my setttings.yaml file:

 -
  type: plugin
  module: chaosslack.notification
  token: xoxb-xxxxxxxxxxx
  channel: chaos-toolkit

I don't think it's an issue with the kubernetes operator, as I've also installed it locally. Do I need to do more configurations?
I test the slack token and it works fine, I also tried using the notifications type: http

Thanks

Notification silently fails when slack has not enough permissions

in verbose mode, (which is not visible otherwhise), CTK does not indicate any warning neither error indicating the notification has not been sent

[2020-10-19 10:01:14 DEBUG] [notification:229] Slack client call failed: The request to the Slack API failed.
    The server responded with: {'ok': False, 'error': 'missing_scope', 'needed': 'chat:write:bot', 'provided': 'identify,incoming-webhook'}
    Traceback (most recent call last):
      File "/Users/dmartin/Sources/chaostoolkit/chaostoolkit-slack/chaosslack/notification.py", line 225, in notify
        attachments=attachments
      File "/Users/dmartin/.pyenv/versions/3.7.4/envs/chaostk/lib/python3.7/site-packages/slack/web/client.py", line 1077, in chat_postMessage
        return self.api_call("chat.postMessage", json=kwargs)
      File "/Users/dmartin/.pyenv/versions/3.7.4/envs/chaostk/lib/python3.7/site-packages/slack/web/base_client.py", line 150, in api_call
        return self._sync_send(api_url=api_url, req_args=req_args)
      File "/Users/dmartin/.pyenv/versions/3.7.4/envs/chaostk/lib/python3.7/site-packages/slack/web/base_client.py", line 248, in _sync_send
        additional_headers=headers,
      File "/Users/dmartin/.pyenv/versions/3.7.4/envs/chaostk/lib/python3.7/site-packages/slack/web/base_client.py", line 377, in _urllib_api_call
        use_sync_aiohttp=False,
      File "/Users/dmartin/.pyenv/versions/3.7.4/envs/chaostk/lib/python3.7/site-packages/slack/web/slack_response.py", line 194, in validate
        raise e.SlackApiError(message=msg, response=self)
    slack.errors.SlackApiError: The request to the Slack API failed.
    The server responded with: {'ok': False, 'error': 'missing_scope', 'needed': 'chat:write:bot', 'provided': 'identify,incoming-webhook'}

Do we want to indicate any potential error to the user ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.