ENTERPRISE: Built-in integrations are available for Sensu Enterprise users only.

Slack Integration

Overview

Send notifications to a Slack channel for events. After configuring an incoming webhook in Slack, configure the handler (integration) with the provided webhook url.

Configuration

Example(s)

The following is an example global configuration for the slack enterprise event handler (integration).

{
  "slack": {
    "webhook_url": "https://hooks.slack.com/services/IB6JgRmRJ/eL7Hgo6kF/CckJm8E4Yt8X3i6QRKHWBekc",
    "username": "sensu",
    "channel": "#ops",
    "timeout": 10
  }
}

Integration Specification

slack attributes

The following attributes are configured within the {"slack": {} } configuration scope.

webhook_url
description
The Slack incoming webhook URL - https://api.slack.com/incoming-webhooks.
required
true
type
String
example
"webhook_url": "https://hooks.slack.com/services/IB6JgRmRJ/eL7Hgo6kF/CckJm8E4Yt8X3i6QRKHWBekc"
channel
description
The Slack channel to notify.
required
false
type
String
default
#general
example
"channel": "#ops"
username
description
The Slack username to use to notify the channel.
required
false
type
String
default
sensu
example
"username": "monitoring"
icon_url
description
The Slack icon URL to use for notifications.
required
false
type
String
default
http://www.gravatar.com/avatar/9b37917076cee4e2d331a785f3426640
example
"icon_url": "http://www.gravatar.com/avatar/9b37917076cee4e2d331a785f3426640"
timeout
description
The handler execution duration timeout in seconds (hard stop).
required
false
type
Integer
default
10
example
"timeout": 30

Start your FREE trial today.

Already using Sensu Core? Upgrade to Sensu Enterprise today to take advantage of its enterprise console, added-value features, built-in integrations, FREE annual training, and enterprise-class support.