Slack
Datadog の調査レポート: サーバーレスの状態 レポート: サーバーレスの状態

Slack

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

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:
  9. 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.

@-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|GROUP_NAME>. To find the GROUP_ID, query the usergroups.list API endpoint of Slack. For example, for a user group named testers you would use the following syntax:

<!subteam^12345|testers>

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.