1. Function

With the Slack messenger you can conveniently receive notifications via a webhook. This works on self-hosted or rented servers, as well as via the free public Slack service.

2. Configuring Slack

To activate webhooks and create a new webhook, you must first create a Slack app. Log in to Slack and create a Workspace. Then proceed as follows:

  1. Create a new app via this link using the Slack API.

  2. Assign any name you like and choose your workspace.

  3. In the next dialog choose Incoming Webhook as the app function.

  4. Next activate webhooks by setting the switch to on.

  5. Create the webhook with the Add New Webhook to Workspace button.

  6. Finally, set the channel (group) where the app should post to, and confirm the rights request.

For testing purposes, on completion you will receive a curl statement which posts Hello World to the desired channel. Copy the webhook URL and switch to Checkmk.

3. Configuration in Checkmk

You have already learned how to set up Checkmk notifications in general in the article about notifications.

As a reminder:

You can not only specify individual users and contact groups as recipients of the notifications. Instead, you can also define a ticket system or an event engine as the target of the notifications, for example. However, you must then take two factors into account when creating the notification rules:

  1. Only a single user may be entered as a contact, i.e. neither a contact group nor an object contact, otherwise several notifications will be sent to the target system for each event.

  2. If the first point is fulfilled, but this user is used in several notification rules that are of the same type (e.g. ServiceNow), then only the last rule applies in each case. It is therefore advisable to create a separate functional user for each of these notification rules.

The configuration in Checkmk requires now only the specification of the webhook URL copied above:

  1. For the Notification Method choose Slack or Mattermost.

  2. Enter the copied webhook URL.

notifications slack

Optionally, you may specify URL prefixes to control links on your Checkmk GUI within the notification. Instead of specifying the webhook URL directly here, you can also use Checkmk’s password store and read the URL from one of its entries.

For testing you can use the Fake check results and Custom notification commands.

On this page