# Discord Webhook

## Discordのセットアップと統合

Webhook機能を使用してカスタムアラートやアクションをDiscordサーバーに送信する手順について取り扱います。本ページの例では新しいサーバーを作成しますが、既存のDiscordサーバーでもWebhookをセットアップできます。

1. Discordアカウントの左上にあ&#x308B;**「 + 」 (サーバーを追加)** をクリックします。

<figure><img src="https://3468650114-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeJwa6ByNJ2qindnPknCW%2Fuploads%2FosNdbU0JIJGeb7mAs2xO%2Fimage.png?alt=media&#x26;token=5fe2035d-a8f3-4b15-a4ea-29283fce7106" alt=""><figcaption></figcaption></figure>

2. **\[オリジナルの作成]** (またはテンプレート) をクリックし、サーバーの用途 (**\[クラブやコミュニティのため]**、**\[自分と友達のため]**) を選択します。

<figure><img src="https://3468650114-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeJwa6ByNJ2qindnPknCW%2Fuploads%2FFPfw6IY4UeUEfEslBUnO%2Fimage.png?alt=media&#x26;token=063d67f3-38b0-4cae-942c-788e6c877722" alt=""><figcaption></figcaption></figure>

3. サーバーにアイコンと名前を設定し、**\[新規作成]** をクリックします。

<figure><img src="https://3468650114-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeJwa6ByNJ2qindnPknCW%2Fuploads%2F89vKMAXNLtHpUodJnkwM%2Fimage.png?alt=media&#x26;token=f872dded-d030-4768-81ad-64fb4a839ff7" alt=""><figcaption></figcaption></figure>

4. これでDiscordサーバーが作成されました。サーバー名をクリックするとドロップダウンメニューが開きます。そこから **\[サーバー設定]** をクリックします。

<figure><img src="https://3468650114-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeJwa6ByNJ2qindnPknCW%2Fuploads%2FtJj5U8r2BpXP7v9KCw28%2Fimage.png?alt=media&#x26;token=148cd43c-cbfd-41cb-b23f-ed3ae08506e2" alt=""><figcaption></figcaption></figure>

5. 左側のメニューからまず **\[連携サービス]** を選択し、**\[ウェブフックを作成]** をクリックします。

<figure><img src="https://3468650114-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeJwa6ByNJ2qindnPknCW%2Fuploads%2F6D80K0O3Gc4dG6HTPary%2Fimage.png?alt=media&#x26;token=547bbfea-4c15-4a88-a2a4-aea5be713b21" alt=""><figcaption></figcaption></figure>

6. ウェブフックの名前とアイコンをカスタマイズし、**\[ウェブフックURLをコピー]** をクリックします。

<figure><img src="https://3468650114-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeJwa6ByNJ2qindnPknCW%2Fuploads%2FNX6rrH0x71OgSh7p7gyB%2Fimage.png?alt=media&#x26;token=4a40f917-135b-494a-981f-5e1d560a0dd9" alt=""><figcaption></figcaption></figure>

7. 次にKeeper管理コンソールにログインし、**\[レポートとアラート]** に移動します。**\[アラート]** をクリックし、既存のアラートを選択するか新規作成します。

<figure><img src="https://3468650114-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeJwa6ByNJ2qindnPknCW%2Fuploads%2FYmLerEF3hAZBDWZEs8fk%2Fimage.png?alt=media&#x26;token=4eb486e2-84af-4f73-a677-ce31f1a9e317" alt=""><figcaption></figcaption></figure>

8. 目的のイベントタイプと属性を選択し、**\[受信者を追加]** をクリックします。

<figure><img src="https://3468650114-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeJwa6ByNJ2qindnPknCW%2Fuploads%2Fk8xPKQIKLVVoFH8tW91e%2Fimage.png?alt=media&#x26;token=cdca98d8-0688-493d-9cc9-73f0606dddc8" alt=""><figcaption></figcaption></figure>

9. 受信者名とメールアドレスを入力し、**\[Webhookを追加]** をクリックします。

<figure><img src="https://3468650114-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeJwa6ByNJ2qindnPknCW%2Fuploads%2FsAjKHM5gVWKCDu74ATYH%2Fimage.png?alt=media&#x26;token=469769c2-ee61-44a5-8708-ec033dd84eeb" alt=""><figcaption></figcaption></figure>

10. 手順**6**でコピーしたウェブフックURL を貼り付けます。

<figure><img src="https://3468650114-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeJwa6ByNJ2qindnPknCW%2Fuploads%2FfFw06pKjofdZWy6B6nVR%2Fimage.png?alt=media&#x26;token=f22e2c3d-4968-4c4b-8f41-979acae52642" alt=""><figcaption></figcaption></figure>

11. 以下のJSONコードをコピーし、上記の画像内の **\[HTTPボディ]** セクションに貼り付けます。

```
{
  "content": "Keeper Security Event",
  "embeds": [
    {
      "title": "Alert Name",
      "description": "#alert_name",
      "fields": [
        {
          "name": "Event Details",
          "value": "#description"
        },
        {
          "name": "IP Address",
          "value": "#remote_address"
        },
        {
          "name": "Timestamp",
          "value": "#timestamp"
        }
      ],
      "footer": {
        "text": "Keeper Security Notification"
      }
    }
  ]
}
```

以上です。以下はDiscord Webhookアラートの例です。イベントの送信開始には最大15分かかる場合があります。HTTPボディの内容は任意で変更できます。

<figure><img src="https://3468650114-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeJwa6ByNJ2qindnPknCW%2Fuploads%2FG0FMUtKBWAU2LVQEYIbl%2Fimage.png?alt=media&#x26;token=3b168d6e-5182-4ae4-967b-b43583b40504" alt=""><figcaption></figcaption></figure>

**参考リンク**

* [Discord Webhooksについて](https://support.discord.com/hc/en-us/articles/228383668-Intro-to-Webhooks)
* [Discordサーバーの作成方法](https://support.discord.com/hc/en-us/articles/204849977-How-do-I-create-a-server)


---

# 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.keeper.io/jp/enterprise-guide/webhooks/discord-webhooks.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.
