Skip to content

Commit

Permalink
New Sink: Webex (robusta-dev#560)
Browse files Browse the repository at this point in the history
* updated forwarder and runner serviceaccount permission for clusterrolebindings

* Job Action Added

* Webex Sink Integration (robusta-dev#3)

* Added webex_sink

* Bug fix with fileblocks, code refactoring, documentation add and minor bug fixes

* Delete job_restart_on_oomkilled.py

* Updated Webex_Sink (robusta-dev#6)

* Added webex_sink

* Bug fix with fileblocks, code refactoring, documentation add and minor bug fixes

* Added Enums and replaced emoji code with emoji icons

* Removed PDF functionality and separated JSON logic from adaptive card function. (robusta-dev#7)

* Added webex_sink

* Bug fix with fileblocks, code refactoring, documentation add and minor bug fixes

* Added Enums and replaced emoji code with emoji icons

* Removed PDF functionality and seperated JSON creation logic from the adaptivecard function logic

* Formatted using Black

* Changes in _send_files and _separate_blocks function (robusta-dev#8)

* Added webex_sink

* Bug fix with fileblocks, code refactoring, documentation add and minor bug fixes

* Added Enums and replaced emoji code with emoji icons

* Removed PDF functionality and seperated JSON creation logic from the adaptivecard function logic

* Formatted using Black

* Changes in _send_files and _separate_blocks function

* Changes in _send_files and _separate_blocks function (robusta-dev#9)

* Added webex_sink

* Bug fix with fileblocks, code refactoring, documentation add and minor bug fixes

* Added Enums and replaced emoji code with emoji icons

* Removed PDF functionality and seperated JSON creation logic from the adaptivecard function logic

* Formatted using Black

* Changes in _send_files and _separate_blocks function

Co-authored-by: wahajXgrid <wahaj.ali@xgrid.co>
Co-authored-by: wahajXgrid <107921443+wahajXgrid@users.noreply.github.com>
  • Loading branch information
3 people authored Oct 19, 2022
1 parent 4b56be2 commit 8d08efc
Show file tree
Hide file tree
Showing 16 changed files with 450 additions and 57 deletions.
2 changes: 2 additions & 0 deletions docs/catalog/sinks/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ The following sinks are supported:
* :ref:`PagerDuty` - send playbooks results to the PagerDuty alerts API
* :ref:`Discord` - send playbooks results to the Discord using webhook
* :ref:`Mattermost` - send playbooks results to the Mattermost using webhook
* :ref:`Webex` - send playbooks results to the Webex using webhook

**Need support for something not listed here?** `Tell us and we'll add it to the code. <https://github.com/robusta-dev/robusta/issues/new?assignees=&labels=&template=feature_request.md&title=New%20Sink:>`_

Expand Down Expand Up @@ -67,6 +68,7 @@ if it has the field `default: true` in the YAML.
ms-teams
mattermost
webhook
webex
Opsgenie
VictorOps
PagerDuty
66 changes: 66 additions & 0 deletions docs/catalog/sinks/webex.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
Webex
#################

Robusta can send playbook results to Webex.

To configure the Webex sink we will need the Webex bot settings

.. note::

2-way interactivity (``CallbackBlock``) isn't implemented yet.


Create your bot access token
------------------------------------------------

1. `Create a new bot. <https://developer.webex.com/my-apps/new/bot>`_
2. Copy and save your bot access token

.. image:: /images/webex_sink/bot_access_token.png
:width: 600
:align: center

3. Copy and save your bot username

.. image:: /images/webex_sink/bot_username.png
:width: 600
:align: center

Get your webex room ID
------------------------------------------------

1. `Click the run button here to list your room IDs. <https://developer.webex.com/docs/api/v1/rooms/list-rooms>`_ .
Copy the room ID of **the room to which you want to send Robusta notifications**.

.. image:: /images/webex_sink/room_id.png
:width: 600
:align: center

2. Go to `Webex spaces <https://web.webex.com/spaces>`_ **> Your space/room > People > Add People > Paste your bot username (email) > Invite > Add**.

.. note::
The bot must be invited to the same room of which you copied the ID of in step 1.

.. image:: /images/webex_sink/add_webex_bot_to_space.png
:width: 600
:align: center

Configuring the webex sink
------------------------------------------------
Now we're ready to configure the webex sink.

.. admonition:: generated-values.yaml

.. code-block:: yaml
sinks_config:
- webex_sink:
name: personal_webex_sink
bot_access_token: <YOUR BOT ACCESS TOKEN>
room_id: <YOUR ROOM ID>
You should now get playbooks results in Webex! Example is shown below:

.. image:: /images/webex_sink/webex_sink_example.png
:width: 1000
:align: center
Binary file added docs/images/webex_sink/add_webex_bot_to_space.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/webex_sink/bot_access_token.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/webex_sink/bot_username.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/webex_sink/room_id.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/webex_sink/webex_sink_example.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 8d08efc

Please sign in to comment.