Slack is a popular communication platform. Wavefront and Slack both support webhooks so you can easily configure an incoming webhook in Slack and an outgoing webhook in Wavefront to pass the notifications from Wavefront alerts into your Slack channels. An alert notification sent to a Slack channel looks like:
Step 1. Build a Custom Integration for Your Slack Channel
In Slack, click the team dropdown menu in the top left hand of the Slack application and select the Customize Slack link:
The Customize Your Team page opens in your browser.
Click the Configure Apps link under the menu list:
On the App Directory page, click the Custom Integrations and then Incoming WebHooks links:
- Click the Add Configuration button.
In the Post to Channel dropdown list, select the Slack channel where your incoming webhook will post messages to and click the Add Incoming WebHooks integration button:
Customize the incoming webhook.
In the Custom Name field, type the name that will appear in your Slack channel as a sender of the message. You can also add additional details such as description, icon, etc. Refer to Incoming Webhooks for detailed instructions.
- Click the Copy URL link.
- Click Save Settings.
Step 2. Create a Slack Alert Target
- In Wavefront, create an alert target.
- Give the alert target a meaningful name.
- In the Triggers field, select the alert state changes that should trigger the notification. See Creating an Alert Target.
- Make sure the Type is Webhook.
Paste the application’s notification URL into the URL field.
- In the content type field, select
- Select Alert Target POST Body Template > TEMPLATE > Slack.
- Customize the template.
- Click Save. The alert target is added to the Alert Targets page.
- In the Name column, note the ID of the alert target under the alert target description.
Step 3. Add the Slack Alert Target to an Alert
- In Wavefront, open the Alerts browser.
- If you have an alert, locate the alert and click the alert name to open the Edit Alert screen. Otherwise, create an alert. For help, see Creating an Alert.
Scroll down to the Target List field.
- Enter the alert target ID into the Alert Target field.
- Select the alert target from the dropdown list to add the list of targets.
- Click Save.