Learn about the Wavefront Slack Integration.

Slack Integration

Slack is a popular communication platform. Wavefront integrates with Slack in two different ways:

  • Wavefront/Slack webhooks let you send alert notifications to Slack.
  • The Wavefront URL unfurler for Slack is for users who paste Wavefront links into Slack messages.

Slack Webhook Integration for Alert Notifications

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:

images/slack_alert.png

Slack URL Unfurler

After a privileged user has added the Wavefront application to Slack, all Slack users will be prompted the next time they post a Wavefront URL. They can decide to unfurl the URL to show an image, unfurl all Wavefront URLs, or not unfurl Wavefront URLs. Here’s a Slack message with an unfurled chart image:

images/unfurled_chart.png

Slack Webhook Integration Setup

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.

Note: To perform the steps as described below, you must have administrator permissions on the workspace that you want to configure.

Step 1. Build a Custom Integration for Your Slack Channel

  1. In Slack, from the workspace drop-down menu in the top left corner, navigate to Customize Workspace_Name. The Customize Your Workspace page opens in your browser.
  2. Click Configure apps from the menu on the left: images/configure_apps.png

  3. On the App Directory page, click Custom Integrations.
  4. Search for and select Incoming WebHooks. images/custom_integrations_select_webhooks.png

  5. Click the Add to Slack button. images/add_to_slack.png

  6. From the Post to Channel drop-down menu, select the Slack channel where your incoming webhook will post messages to, and click the Add Incoming WebHooks integration button: images/channel_settings.png

  7. On the Edit configuration page, scroll down to the Integration Settings section and customize the incoming webhook. images/integration_settings.png

    a) In the Customize Name text box, enter the name that will appear in your Slack channel as a sender of the message.
    b) You can also add additional details such as description, icon, etc. See Incoming Webhooks for detailed instructions.

  8. Under the Webhook URL text box, click Copy URL.
  9. Click Save Settings.

Step 2. Create a Slack Alert Target

  1. In Wavefront, create an alert target.
  2. Give the alert target a meaningful name.
  3. In the Triggers field, select the alert state changes that should trigger the notification. See Creating an Alert Target..
  4. Make sure that the Type is set to Webhook.
  5. Paste the application’s notification URL into the URL field.

  6. In the content type field, select application/json.
  7. Select Alert Target POST Body Template > TEMPLATE > Slack.
  8. Customize the template.
  9. Click Save. The alert target is added to the Alert Targets page.
  10. In the Name column, under the alert target description, note the ID of the alert target.

Step 3. Add the Slack Alert Target to an Alert

  1. In Wavefront, open the Alerts browser.
  2. If you have an alert, locate the alert and click the alert name to open the alert in edit mode. Otherwise, create an alert. For help, see Create and Manage Alerts.
  3. Scroll down to the Target List field.

  4. Enter the alert target ID into the Alert Target field and select the alert target from the drop-down list to add the list of targets.
  5. Click Save.

The setup of your Slack Webhook is now complete. Going forward, specified users will receive alert notifications in Slack.

Slack URL Unfurler Setup (Chart Images in Slack)

The Slack URL Unfurler has completely different functionality from the Webhook setup. It supports including chart images in Slack. When a user copies a link to a Wavefront chart into Slack, other users can see the chart image in Slack without having to click a link. Currently only *.wavefront.com domain can be unfurled.

To implement URL Unfurl functionality for links to Wavefront pages, follow these steps:

  1. A Slack admin user with the right privileges installs the Wavefront application into Slack. This user must have the permission to add apps to the Slack workspace. Who that person is depends on the Slack setup at your site.
  2. After that, any user who pastes a link to a Wavefront instance - usually a link to a chart - into Slack is prompted as follows:
    • Unfurl links to Wavefront instances
    • Don’t unfurl links to this Wavefront instance
    • Don’t unfurl links.

    The following image illustrates this:

    images/slack_user_message.png

  3. Click Yes (Authenticate via Browser) and you will be prompted to link your accounts to enable the unfurl process.

Now, you will be able to observe dashboards and charts directly within Slack.

Troubleshooting

If you are unable to unfurl a link, before opening a support request with the VMware Tanzu Observability Support, do the following:

  1. In the Slack interface, run the /unignore <domain> command and make sure that the Tanzu Observability by Wavefront domain has not been ignored.
  2. Check whether the Wavefront Slack Unfurl app is muted.

    1. In the Slack interface, navigate to Administration > Manage Apps.
    2. Click Muted Apps.

    If the Wavefront Slack Unfurl app is muted, try to unmute it. See the Muted Apps Slack documentation.