HowTo: Slack integration for UptimeRobot

Getting notifications for UptimeRobot monitoring

You may have wondered if it is possible to view the status of your websites at a glance in your Slack or HipChat. And it turns out to be relatively simple.  In this guide I will be focusing on UptimeRobot integration with Slack and go through the process step by step.

The UptimeRobot blog has a guide on this exact topic, but that only explains half the story. In this blog post, I will try to complete it.

How does it work?

Programming a bot for this purpose is completely unnecessary, since UptimeRobot supports Slack’s Incoming WebHook functionality. Here is a quick diagram of how your Slack channel will be notified.

UptimeRobot and slack integration diagram

Configuring the incoming webhook

While in your Slack workspace, left-click the name of your workspace, and pick Administration > Manage Apps from the dropdown Menu. A new browser window should appear in which you can customize your workspace. From here, navigate to Custom Integrations and then to Incoming WebHooks. Now you can configure a new Incoming WebHook by clicking the big, green Add Configuration button.

The first form lets you pick any existing channel or user on your workspace to notify when the WebHook is called. A new channel can also be created here. After picking a channel or user to be notified, click the Add Incoming WebHooks Integration Button. The most important part on the next screen is the WebHook URL. Make sure you copy this URL, since you will need it later on when adding this WebHook as an “alert contact” for your UptimeRobot monitors.

Near the bottom of this page, you may further customize the Incoming WebHook you just created. Give it a name, description and perhaps a custom icon which will make the UptimeRobot notifications more recognizable in your Slack workspace.

Adding your WebHook as an alert_contact

Now that you have an Incoming WebHook, all we need to do now is configure UptimeRobot to send status updates for the monitors of your choice to this WebHook. Notifications will then start appearing in a channel or private message to a user on your Slack workspace, depending on how you configured the Incoming WebHook.

Log in on UptimeRobot to view the Dashboard and click My Settings in the top bar. The left-hand pane of this screen contains a section titled Alert Contacts. By clicking the green Add Alert Contact button you can declare new contacts.  The same procedure applies to defining new email contacts so you may already be familiar with this. But maybe you weren’t aware that  a contact’s Alert Contact Type can also be Slack. If you select this type, the form should expand and you will be able to set the new contact’s name and WebHook URL. Enter the URL we just generated by creating a new Incoming WebHook in the Slack admin panel.

So after filling out the form, your new contact should have joined the list of “alert contacts”. Assigning a Slack contact to an UptimeRobot monitor is no different than assigning an email contact to one.

If you are not entirely satisfied with the notifications, you can always customize them. That is beyond the scope of this short guide, but this blog post by UptimeRobot has more information about adding custom text for your notifications.