> ## Documentation Index
> Fetch the complete documentation index at: https://docs.peerdb.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Slack Alerting

export const AlertSender_0 = "Slack"

PeerDB can be configured to automatically send alerts via {AlertSender_0} for issues such as Slot Lag Growth and Open Connections.

# Configuring Slack

## Creating and Installing a Slack App (One-Time)

<Info>This step is not required if you already have an Auth token that starts with `xoxb-`</Info>
Follow the [Slack Apps Quickstart](https://api.slack.com/start/quickstart) (upto Step 3) to create and install a Slack App on your Workspace with `chat:write` permissions.

<Info>
  You can find the Auth token starting with `xoxb-` under

  <Frame caption="Getting the Slack Auth token">
    <img src="https://mintcdn.com/peerdb/MRN5BST_xrBv7brJ/images/alerting/slack/slack-token.jpg?fit=max&auto=format&n=MRN5BST_xrBv7brJ&q=85&s=9cc96b5ca71169b14adcc1a4ba674f67" width="2354" height="1904" data-path="images/alerting/slack/slack-token.jpg" />
  </Frame>
</Info>

## Inviting the app to the required channels

In order to make sure that the newly created app can post in the required channels, go ahead and invite it to those channels by sending this message:

```
/invite @<YourAppName>
```

## Getting the channel IDs

Click the Channel Name if you have the channel open or right-click the channel and click "View channel details" from the
side bar to get the channel view.

Now the Channel ID can be copied at the bottom of the channel info dialog:

<Frame caption="Getting the Slack Channel ID">
  <img src="https://mintcdn.com/peerdb/MRN5BST_xrBv7brJ/images/alerting/slack/slack-channel-id.jpg?fit=max&auto=format&n=MRN5BST_xrBv7brJ&q=85&s=cc9b56a2d74d236c4c6d5092c980bfb7" width="1036" height="1468" data-path="images/alerting/slack/slack-channel-id.jpg" />
</Frame>

# Configuring PeerDB UI

## Adding a configuration

1. Click on "Alert Configuration" from the left side of the PeerDB UI and then click "Add Configuration".

2. Now select "Slack" from the list of alert providers and paste the Auth Token and Channel ID from before.

   <Info>To add multiple channel IDs for a given configuration, add them comma-separated</Info>

3. Click on "Create"

<Frame caption="Creating Slack Alert Configuration">
  <img src="https://mintcdn.com/peerdb/MRN5BST_xrBv7brJ/images/alerting/slack/slack-alerting-config.jpg?fit=max&auto=format&n=MRN5BST_xrBv7brJ&q=85&s=23866e6694e8bf60d57188a213007fa2" width="2100" height="1900" data-path="images/alerting/slack/slack-alerting-config.jpg" />
</Frame>
