# Discord Destination

## Overview

Destinations are integrations that receive alerts from rules, policies, system health notifications, and rule errors. Panther supports configuring Discord as a destination where you will receive alerts.

## How to configure Panther alerts to send to Discord

### Prerequisites

* In your Discord server, create a new channel or confirm which existing channel you want to send Panther alerts to.

### Step 1: Obtain your Discord channel's webhook URL

Follow these steps for the Discord channel you wish to send alerts to:

1. In Discord, select the Server. Under *Text Channels*, locate the Discord channel you want to use. Select **Edit Channel (gear icon)**.

   <figure><img src="/files/tgI5BpHiJvkmnJrvbkOv" alt="In Discord, the gear icon next to &#x22;#general&#x22;, under &#x22;Text Channels&#x22; is highlighted."><figcaption></figcaption></figure>
2. Click **Integrations** and select **Create Webhook**.

   <figure><img src="/files/xvNJXHcZvdhdFIoLPoht" alt="In Discord on the Integrations page, there is a button in the center of the page labeled &#x22;Create Webhook.&#x22;"><figcaption></figcaption></figure>
3. Discord will create a new webhook for with a default name. Click on the webhook (in the example below, **Spidey Bot**) to expand it and view the details.

   <figure><img src="/files/8LsSrWmXDG4JSHVvxICL" alt="In Discord under the &#x22;New Webhook&#x22; button, there is a webhook called &#x22;Spidey Bot.&#x22;"><figcaption></figcaption></figure>
4. Optionally, rename the webhook then click **Save Changes**.
   * The webhook name is shown as the sender in your channel when alerts are delivered.

     <figure><img src="/files/IRwndIunDHgYJuIk9mCW" alt="In Discord, the webhook details are expanded. &#x22;My Discord Destination&#x22; has been typed into the &#x22;Name&#x22; field."><figcaption></figcaption></figure>
5. Click **Copy Webhook URL**. You will need this value in the next step.

For more information on using webhooks in Discord, please see [Discord's webhook resource documentation](https://discord.com/developers/docs/resources/webhook).

### Step 2: Create the webhook integration in Panther

1. In the Panther Console, navigate to **Configure > Alert Destinations.**
2. Click **+ Add your first Destination**.
   * If you have already created Destinations, click **Create New** in the upper right side of the page to add a new Destination.
3. Click **Discord**.
4. On the "Configure Your Webhook Destination page", fill out the form:
   * **Display Name:** Enter a descriptive name.
   * **Discord Webhook URL**: Enter the Discord webhook URL you obtained in Step 1.
     * Your webhook URL will have the following format: `https://discord.com/api/webhooks/<token-string>`
   * **Severity**: Select the severity level of alerts to send to this Destination.
   * **Alert Types**: Select the alert types to send to this Destination.
   * **Log Type**: By default, we will send alerts from all log types. Specify log types here if you want to only send alerts from specific log types.
   * **Allow Manual Dispatch**: Set this toggle ON if you'd like to be able to [manually dispatch alerts](https://docs.panther.com/alerts#manual-alert-dispatch) to this destination.\
     ![](/files/H3lUlKoNcKR67T8bpfZG)
5. Click **Add Destination**.
6. Click **Send Test Alert** to make sure everything works correctly.
   * A test event should now exist in your Discord channel.
7. Click **Finish Setup.**

## Generate a test alert

Click **Test Alert** to generate an alert and send to Discord. The payload of the alert is seen below:

```json
{"id":"Test.Alert","createdAt":"2022-04-26T03:17:32.099054303Z","severity":"INFO","type":"RULE","link":"https://domain.runpanther.net","title":"This is a Test Alert","name":"Test Alert","alertId":"Test.Alert","alertContext":{},"description":"This is a Test Alert","runbook":"Stuck? Check out our docs: https://docs.runpanther.io","tags":["test"],"version":"1"}
```

Once the alert is received by Discord, a message is sent to a channel in Discord:

<figure><img src="/files/Jkc5mdOZiEhq599FGxJD" alt="The channel in Discord contains a test alert."><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.panther.com/alerts/destinations/discord.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
