At the time of this writing (March 2020), Chaos Toolkit allows us to send notifications to at least two different targets (there may be others by the time you’re reading this). We can send notifications to Slack, or to any HTTP endpoint.

Using Slack as the target for notifications

We’ll focus on Slack. If that’s not your favorite communication tool, you should be able to change the configuration to use anything else, as long as that destination can receive HTTP requests. Since almost every tool designed in this century has an API exposed through HTTP, we should be able to send notifications to any destination. The question is whether we do that through a plugin, just like the one we’re about to use, or through the generic HTTP notification mechanism available in Chaos Toolkit.

We’re going to explore how to send notifications to Slack. Later on, if you decide that Slack is not something you want to use, you should be able to adapt the examples to HTTP notifications.

For you to be able to see the notifications we are about to send, you’ll have to do one of two things. You can join DevOps20 Slack workspace. If you don’t want to do that and, instead, you prefer to use your own Slack workspace, you will need to change a few commands. Specifically, you’ll have to change the Slack API token in some of the YAML definitions we’re about to explore.

So, either use my Slack workspace, and for that, you’ll have to join DevOps20 Slack workspace or modify some of the YAML definitions that I prepared.

Inspecting the settings.yaml file

Let’s take a look at settings.yaml that contains a few things that we will need.

Get hands-on with 1200+ tech skills courses.