How to Integrate Slack and Fairwinds Insights

Fairwinds Insights has an integration with Slack, so you can get notifications about critical changes to your clusters.

Transcript

I wanted to go ahead and show you how to connect Insights to Slack so that this way you can get information to the right people as soon as it's available. The first thing we're going to do is once we've logged in, we can go down here to settings. As soon as we're in settings, we have these options at the top. We can click on integrations. And at this point we can see all the different integrations that are available.

First thing we're going to do is click add integration for Slack. This is going to make sure that we want to grant the permissions for Insights to be able to post to Slack. So as soon as we allow this, we can see that Slack is now installed. Now there's a couple things you can do with this. First, you can get these notifications where you can say for a particular cluster or for all clusters, we want to send notifications to this particular channel.

Whenever there are upgrades available, or whenever there's batches of action items, you can have those sent to a specific channel. These will be populated based on what your Slack workspace has available to you. More importantly, though, having Slack connected allows us to build on action items and send them to certain channels based on some criteria. So let's say we have a developer team that is constantly deploying to the testing name space. Anytime that there are certain criteria that aren't met, like, let's say, you want CPU requests set on all of your resources. If a resource comes into the cluster that does not have CPU requests set, and it comes up in the testing name space, then we would like to send that to this particular team.

So here we can set up automation rules. And if you look at this Slack notification, we've got a pretty simple automation rule here set up already. So if a new action item comes in and it has the event type of CPU request missing, then we're going to call this function right here, send Slack notification. The first thing that it takes in is the name of the Slack channel. In this case, I'm sending it to my Rachel testing public channel. And then we're sending the object, the notification, which is the action item here, just cleaned up a little bit more. At that point, we can send that to Slack, to that particular channel. And I will instantly get a notification.

There's a lot of things we can do here to customize this. Like if you'll notice, I haven't set a name space, but we could also say if actionitem.namespace equals the namespace we put in, then it will start to filter down more there. So there's a lot of power here. And as soon as we connect the Slack integration, that's where we can start to enable it and work with it.