Slack connector and actionedit

The Slack connector uses Slack Incoming Webhooks.

Create connectors in Kibanaedit

You can create connectors in Stack Management > Connectors or as needed when you’re creating a rule. For example:

Slack connector
Connector configurationedit

Slack connectors have the following configuration properties:

Name
The name of the connector.
Webhook URL
The URL of the incoming webhook. See Slack Incoming Webhooks for instructions on generating this URL. If you are using the xpack.actions.allowedHosts setting, make sure the hostname is added to the allowed hosts.

Create preconfigured connectorsedit

If you are running Kibana on-prem, you can define connectors by adding xpack.actions.preconfigured settings to your kibana.yml file. For example:

xpack.actions.preconfigured:
  my-slack:
    name: preconfigured-slack-connector-type
    actionTypeId: .slack
    secrets:
      webhookUrl: 'https://hooks.slack.com/services/abcd/efgh/ijklmnopqrstuvwxyz'

Secrets defines sensitive information for the connector type.

webhookUrl
A string that corresponds to Webhook URL.

Test connectorsedit

You can test connectors with the run connector API or as you’re creating or editing the connector in Kibana. For example:

Slack params test

Slack actions have the following properties:

Message
The message text, converted to the text field in the Webhook JSON payload. Currently only the text field is supported. Markdown, images, and other advanced formatting are not yet supported.

Connector networking configurationedit

Use the Action configuration settings to customize connector networking configurations, such as proxies, certificates, or TLS settings. You can set configurations that apply to all your connectors or use xpack.actions.customHostSettings to set per-host configurations.

Configure a Slack accountedit

You need a Slack webhook URL to configure a Slack account. To create a webhook URL, set up an an Incoming Webhook Integration through the Slack console:

  1. Log in to slack.com as a team administrator.
  2. Go to https://my.slack.com/services/new/incoming-webhook.
  3. Select a default channel for the integration.

    slack add webhook integration
  4. Click Add Incoming Webhook Integration.
  5. Copy the generated webhook URL so you can paste it into your Slack connector form.