Send Notifications to Slack
You can easily configure Moogsoft to send alert or incident notifications to Slack using the Slack API. The following steps describe the workflow.
In Slack:
Go to your Slack app and create a new channel with a descriptive name such as Moogsoft-incidents.
Log in to your organization's Slack site and create a new Slack bot with a descriptive name.
Make sure that the bot is running in the new channel you just created.
Copy/paste the API key for the bot into a text file.
In Moogsoft:
Type: Incident (recommended)
URL:
https://slack.com/api/chat.postMessage
Authorization:
Authorization = Bearer Token
Paste the API key for the Slack bot into the field provided.
Headers: Add the following key-value pair:
Content-type
=application/json
Body: Enter a JSON structure in the following format. You can use incident macros to customize the the "text" description that appears in Slack.
{"channel":"<destination-slack-channel>", "text" : "incident $description"}
This field supports "smart look-aheads:"
Make sure there is a space before the cursor.
Press the dollar sign ($) to open a pop-up menu.
Select the alert or incident field you want to include in the payload.
You can also enter
$alert_url
or$incident_url
to include a URL in the payload. These URLs open the alert or incident directly in the Moogsoft UI.
Watch a video
Watch how to Integrate Moogsoft with Slack.