我想使用 AWS Service Health Dashboard (AWS SHD) Notifier 工具來檢查 AWS 服務的問題。
簡短說明
最佳實務是使用 AWS 使用者通知或 Amazon EventBridge 來接收公開事件通知。「使用者通知」提供了一個集中設定與管理 AWS 通知的地方。AWS Health 會將公開事件發佈到您主要與備用 AWS 區域的 EventBridge。
AWS Health SHD Notifier 會將服務狀態更新傳送到 Amazon Simple Notification Service (Amazon SNS) 主題、Amazon Chime webhook 或 Slack webhook。如需更多資訊,請參閱 GitHub 網站上的 AWS Health SHD Notifier。
解決方法
**注意:**如果您在執行 AWS Command Line Interface (AWS CLI) 命令時收到錯誤訊息,請參閱對 AWS CLI 錯誤進行疑難排解。此外,請確定您使用的是最新的 AWS CLI 版本。
設定使用者通知
若要設定使用者通知,請建立通知組態。
使用 EventBridge 接收公開事件通知
若要從 EventBridge 接收 AWS Health 事件,請建立可對 Amazon EventBridge 事件做出反應的規則。
安裝 AWS SHD Notifier 工具
請完成下列步驟:
-
在終端或 CLI 執行下列命令:
git clone https://github.com/aws/aws-health-tools.git && cd aws-health-tools
輸出範例:
Cloning into 'aws-health-tools'...
remote: Enumerating objects...
remote: Counting objects...
remote: Compressing objects...
remote: Total XXXX (delta YY), reused ZZZZ
Receiving objects: 100%
Resolving deltas: 100%
-
執行以下命令:
git filter-branch --subdirectory-filter shd-notifier/ HEAD
輸出範例:
Rewrite ... (X/Y) (Z%)
...
Ref 'HEAD' was rewritten
在 Slack、Amazon Chime 或 Amazon SNS 建立通知
若要建立通知類型,請參閱以下文件:
執行 CloudFormation 範本
請完成下列步驟:
- 開啟 AWS CloudFormation 主控台。
- 在導覽窗格中選擇 Stacks (堆疊),然後選擇 Create stack (建立堆疊)。
- 在 Prerequisite - Prepare template (先決條件 - 準備範本) 中,選擇 Choose an existing template (選擇現有範本)。
- 在 Specify template (指定範本) 下,選擇 Amazon S3 URL (Amazon S3 網址)。
- 輸入以下 Amazon Simple Storage Service (Amazon S3) 範本網址:
https://s3.amazonaws.com/aws-health-tools-assets/cloudformation-templates/shd-notifier.yml
- 選擇 Next (下一步)。
- 在 Stack name (堆疊名稱) 中輸入 ShdNotifier。
- 選擇 Next (下一步)。
- 選取 I acknowledge that AWS CloudFormation might create IAM resources (我確認 AWS CloudFormation 可能會建立 IAM 資源)。
- 選擇 Next (下一步),然後選擇 Submit (提交)。
以下為範例端點陣列:
- Chime: ["https://hooks.chime.aws/incomingwebhooks/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXXX?token=XXXXXXXXXXXXXXXXXXXX"]
- Slack: ["arn:aws:sns:us-east-1:111122223333:MY_TOPIC_NAME"]
- Amazon SNS: ["https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX"]
執行 shd-notifier
在 AWS CLI 執行 deploy.sh 檔案:
/bin/bash deploy.sh Health-Event us-east-1
**注意:**將 us-east-1 替換為您的區域。