Slack
New announcements from Dash: Incident Management, Continuous Profiler, and more! New announcements from Dash!

Slack

Crawler Crawler

Overview

Connect Slack to Datadog in order to help your team collaborate by:

  • Sharing graphs with your colleagues in your team’s private or public channels.
  • Receiving alerts and notifications from Datadog within Slack.

Setup

Installation

If you are using the US Datadog app region, install the Datadog Slack app in your Slack workspace:

  1. Navigate to the Slack integration tile under Integrations in the Datadog app. Click the Connect Slack Account button at the bottom of the tile.

  2. Confirm your Slack and Datadog account are connected. Note: You may need your Datadog workspace admin to approve this change, but you will only need to do this once.

Note: The Slack App Directory Slack integration works only if you are using the US region Datadog application. For other regions, see the Slack Webhook documentation.

Using the Slack App

Once the app has been installed, you can invite the Slack app to any channel:

/invite @Datadog

Then, connect your Datadog account to your Slack account:

/datadog accounts

Additional functionality allows you to bring parts of Datadog into Slack with a command.

/datadog dashboard
/datadog slo

You can also copy and paste any widget from Datadog to Slack, using CMD + C or CTRL + C, or clicking the expand icon on top of a widget, and clicking “copy”. When you paste, you’ll see a link which will unfurl as the widget you’ve pasted once sent to a channel.

Connecting monitors

You can mute triggering monitors in Slack with the click of a button.

There are two ways you can update your monitors to be sent from the Slack app:

Bulk Update: You can bulk update all of your monitors to be sent from the Slack App, and include the muting buttons by clicking the “Upgrade” button at the top of the configuration for each of your Slack accounts in the integration tile in Datadog.

Manual: If you’d like to test this functionality before rolling it out to all of your teams, you can manually add the channels to the new app account configuration in the Slack integration configuration. Note: You may need to remove duplicate references to the same channels.

Using Datadog Incidents

Declare a new incident from the Slack App with:

/datadog incident 

When a new incident is created, a corresponding Slack channel #incident-(unique number ID) is created, and a message is sent to the channel telling you the new incident channel to use. The channel topic changes with the incident.

Update the incident state (e.g severity) with:

/datadog incident update 

Use the message actions command (three dots you can find after hovering over a message sent in an #incident channel on the far right) to send the message to the Incident App Timeline.

Use the Slack Webhook if you are using a non-US region of the Datadog Application.

Installation

The Slack integration is installed via its integration tile in the Datadog application.

Configuration

  1. In your Slack account, go to the Applications page and search for Datadog.
  2. Click Install –> Add Integration, then copy the Slack Webhook URL.
  3. Navigate to the Datadog-Slack integration tile in the configuration tab.
  4. Click on Add Account
  5. Add a Slack Account Name of your choice.
  6. Paste the Webhook URL in the Slack Account Hook field.
  7. Click Save.
  8. Add your Slack Channels to post to:
  1. If you would like to be notified for every comment on a graph, tick the check box Transfer all user comments by each channel. If this box is left unchecked, you must use the @slack-<ACCOUNT_NAME>-<CHANNEL_NAME> syntax in order for comments to be posted to Slack. You may use @slack-<CHANNEL_NAME> if you are only using one account or referring to the first account.

You can also configure sending alerts to Slack from monitors and the event stream.

Note: If you are a non-US Datadog app user and would like us to add access to the Slack App Directory integration, let our support team know!

@-mentions in Slack from monitor alert

After setting up the Slack integration, type @slack in your notification message to see the available list of channels to send your notification to:

Wrap the @username in < > in your monitors message template to @-notify the defined user within slack notifications. For instance: @slack-SLACK_CHANNEL <@USERNAME>

Note: If you are having trouble pinging someone, use their Slack username instead of the display name. The username is located in Slack account settings under Username.

Mention @here or @channel by using <!here> or <!channel>, respectively.

For user groups, use <!subteam^GROUP_ID>. To find the GROUP_ID, query the usergroups.list API endpoint of Slack. For example, for a user group with an ID of 12345 you would use the following syntax:

<!subteam^12345>

Note: Trailing special characters in a channel name are unsupported for the Slack @-notifications. e.g. @----critical_alerts works, but @--critical_alerts-- won’t receive any notifications.

Using message template variables to dynamically create @-mentions

Use message template variables within a monitor message to dynamically build @-mentions.

For example, if the rendered variable is setup as a channel in the Slack integration:

  • @slack-{{owner.name}} post a message on the owner’s channel for this monitor.

  • @slack-{{host.name}} post a slack message to the #host.name channel in Slack.

Or create an @-mention that goes directly to a specific email:

  • @team-{{team.name}}@company.com sends an email right to the team’s mailing list.

Data Collected

Metrics

The Slack integration does not provide any metrics.

Events

The Slack integration does not include any events.

Service Checks

The Slack integration does not include any service checks.

Troubleshooting

Need help? Contact Datadog support.