> ## Documentation Index
> Fetch the complete documentation index at: https://wb-21fd5541-feat-cli-docs-generator.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Slack アラートの設定

Integrate W\&B Server with [Slack](https://slack.com/).

<Note>
  W\&B 専用クラウドデプロイメントでの Slack アラートの設定を示した[ビデオを見る](https://www.youtube.com/watch?v=JmvKb-7u-oU) (6 分)。
</Note>

## Slack アプリケーションを作成する

以下の手順に従って Slack アプリケーションを作成してください。

1. [https://api.slack.com/apps](https://api.slack.com/apps) にアクセスし、**Create an App** を選択します。

   <Frame>
     <img src="https://mintcdn.com/wb-21fd5541-feat-cli-docs-generator/ieIe5bCVegZ3Xn7A/images/hosting/create_an_app.png?fit=max&auto=format&n=ieIe5bCVegZ3Xn7A&q=85&s=91921d009fd5c16095fdba1cc668578d" width="1442" height="686" data-path="images/hosting/create_an_app.png" />
   </Frame>

2. **App Name** フィールドにアプリの名前を入力します。

3. アプリを開発したい Slack ワークスペースを選択します。アラートに使用する予定のワークスペースと同じワークスペースを使用していることを確認してください。

   <Frame>
     <img src="https://mintcdn.com/wb-21fd5541-feat-cli-docs-generator/ieIe5bCVegZ3Xn7A/images/hosting/name_app_workspace.png?fit=max&auto=format&n=ieIe5bCVegZ3Xn7A&q=85&s=e3363de3d687e3672ccc3128a71f29c1" width="1160" height="1106" data-path="images/hosting/name_app_workspace.png" />
   </Frame>

## Slack アプリケーションを設定する

1. 左側のサイドバーで **OAth & Permissions** を選択します。

   <Frame>
     <img src="https://mintcdn.com/wb-21fd5541-feat-cli-docs-generator/z30ndE1lYRi8WMuv/images/hosting/add_an_oath.png?fit=max&auto=format&n=z30ndE1lYRi8WMuv&q=85&s=3c6c5a78beafb055fe9ee98826b0bdd4" width="218" height="324" data-path="images/hosting/add_an_oath.png" />
   </Frame>

2. Scopes セクションで、ボットに **incoming\_webhook** スコープを追加します。スコープは、アプリに開発ワークスペースでのアクションを実行する権限を与えます。

   Bot の OAuth スコープについての詳細は、Slack API ドキュメントの「Understanding OAuth scopes for Bots」チュートリアルを参照してください。

   <Frame>
     <img src="https://mintcdn.com/wb-21fd5541-feat-cli-docs-generator/ieIe5bCVegZ3Xn7A/images/hosting/save_urls.png?fit=max&auto=format&n=ieIe5bCVegZ3Xn7A&q=85&s=76e99a0a2c9abf9270430a0aae9483aa" width="656" height="291" data-path="images/hosting/save_urls.png" />
   </Frame>

3. W\&B インストールを指すようにリダイレクト URL を設定します。ローカルシステム設定で指定されたホスト URL と同じ URL を使用してください。インスタンスへの異なる DNS マッピングを持つ場合は、複数の URL を指定できます。

   <Frame>
     <img src="https://mintcdn.com/wb-21fd5541-feat-cli-docs-generator/ieIe5bCVegZ3Xn7A/images/hosting/redirect_urls.png?fit=max&auto=format&n=ieIe5bCVegZ3Xn7A&q=85&s=1083cd154abb06999716fd3c1eb0331b" width="650" height="321" data-path="images/hosting/redirect_urls.png" />
   </Frame>

4. **Save URLs** を選択します。

5. **Restrict API Token Usage** で、オプションとして W\&B インスタンスの IP または IP 範囲を許可リストに指定できます。許可された IP アドレスの制限は、Slack アプリケーションのセキュリティをより強化します。

## Slack アプリケーションを W\&B に登録する

1. W\&B インスタンスの **System Settings** または **System Console** ページに移動します。デプロイメントに応じて異なります。

2. 使用している System ページに応じて、以下のオプションのいずれかを実行します：

   * **System Console** にいる場合: **Settings** から **Notifications** に進みます。

     <Frame>
       <img src="https://mintcdn.com/wb-21fd5541-feat-cli-docs-generator/ieIe5bCVegZ3Xn7A/images/hosting/register_slack_app_console.png?fit=max&auto=format&n=ieIe5bCVegZ3Xn7A&q=85&s=e8029ecca6eadbfc4b4744ba3c1d4555" width="1134" height="477" data-path="images/hosting/register_slack_app_console.png" />
     </Frame>

   * **System Settings** にいる場合: カスタム Slack アプリケーションを有効にするために **Enable a custom Slack application to dispatch alerts** をトグルします。

     <Frame>
       <img src="https://mintcdn.com/wb-21fd5541-feat-cli-docs-generator/ieIe5bCVegZ3Xn7A/images/hosting/register_slack_app.png?fit=max&auto=format&n=ieIe5bCVegZ3Xn7A&q=85&s=1a8aa3f59754abbdaed4620d608abb39" width="667" height="187" data-path="images/hosting/register_slack_app.png" />
     </Frame>

3. **Slack client ID** と **Slack secret** を入力し、**Save** をクリックします。設定の基本情報でアプリケーションのクライアント ID とシークレットを見つけることができます。

4. W\&B アプリケーションで Slack インテグレーションを設定して、すべてが正常に動作していることを確認します。
