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.
1. 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:
Create a new app via this link using the Slack API.
Assign any name you like and choose your workspace.
In the next dialog choose Incoming Webhook as the app function.
Next activate webhooks by setting the switch to on.
Create the webhook with the Add New Webhook to Workspace button.
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.
2. Configuring Checkmk
You have already learned how to set up Checkmk notifications in general in the article on notifications.
In Checkmk it is now sufficient to specify the URL copied above:
Create new parameters for Slack with Setup > Events > Notifications > Parameters for notification methods > Parameters for Slack or Mattermost > Add parameter.
-
Under Parameter properties, enter the copied webhook URL, which must begin with
https://
:Instead of entering the URL directly here, you can also read it from the password store - provided it was previously stored there.
Optionally, you may specify URL prefixes to control links on your Checkmk GUI within the notification.
You can find out how to test the new notification method in the article on notification rules.