Skip to main content

Connect with Slack

To enable sending alert notifications to Slack, you need to create an app in your Slack workspace. The following steps guide you through the process:

  1. Go to Slack apps page and click on Create New App button.

    Create New App

    Create New App

  2. Click on Blank app option in the popup.

    From scratch

  3. On the next screen, fill CubeAPM for App Name, select the desired Slack workspace, and then click on Continue button.

    Select Workspace

  4. On the What it can do in Slack? screen, click on Add Bot Scopes button.

    Add Bot Scopes

  5. Search for and add the following scopes under Bot scopes:

    channels:read
    chat:write
    chat:write.public
    groups:read
    users:read

    Once all the scopes are added, click on Continue button.

    Added Scopes

  6. On the What it can respond to in Slack? screen, nothing needs to be added. Click on Continue button.

  7. On the Review your app screen, click on Create and Install button.

    Review your app

  8. Now look for OAuth Tokens for Your Workspace section on the same page, and click on Install to Workspace button.

    Install to MyWorkspace

  9. Click on Allow on the next screen.

    Click on Allow

  10. Look for Bot User OAuth Token on the subsequent page. The token value starts with xoxb. Copy this token value.

    Copy Bot User OAuth Token

  11. The above token can be provided to CubeAPM to enable sending alert notifications to Slack (set alertmanager.oauth.slack.token property in /etc/cubeapm/config.properties, or configVars.alertmanager.oauth.slack.token in helm chart values file).

Update Note​

If your CubeAPM Slack app was created before mentions were supported, it may not have the users:read scope. The Mention field in CubeAPM UI then shows the error Could not load Slack users: missing_scope. To fix this:

  1. Go to Slack apps page, open your CubeAPM app, and go to OAuth & Permissions.
  2. Under Bot Token Scopes, add the users:read scope.
  3. Click Reinstall to Workspace at the top of the page, and then click Allow.

The Bot User OAuth Token does not change on reinstall, so CubeAPM's configuration does not need to be updated. Refresh CubeAPM UI to load the users.