第5章 可観測性アラートの管理
ハブクラスターとマネージドクラスターの変更が通知されるように、可観測性サービスのアラートを受信および定義します。
5.1. Alertmanager の設定 リンクのコピーリンクがクリップボードにコピーされました!
メール、Slack、PagerDuty などの外部メッセージングツールを統合し、Alertmanager から通知を受信します。open-cluster-management-observability
namespace で alertmanager-config
シークレットを上書きして、統合を追加し、Alertmanager のルートを設定します。以下の手順を実行して、カスタムのレシーバールールを更新します。
alertmanager-config
シークレットからデータを抽出します。以下のコマンドを実行します。oc -n open-cluster-management-observability get secret alertmanager-config --template='{{ index .data "alertmanager.yaml" }}' |base64 -d > alertmanager.yaml
oc -n open-cluster-management-observability get secret alertmanager-config --template='{{ index .data "alertmanager.yaml" }}' |base64 -d > alertmanager.yaml
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 以下のコマンドを実行し、
alertmanager.yaml
ファイル設定を編集して保存します。oc -n open-cluster-management-observability create secret generic alertmanager-config --from-file=alertmanager.yaml --dry-run -o=yaml | oc -n open-cluster-management-observability replace secret --filename=-
oc -n open-cluster-management-observability create secret generic alertmanager-config --from-file=alertmanager.yaml --dry-run -o=yaml | oc -n open-cluster-management-observability replace secret --filename=-
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 更新したシークレットは以下の内容のようになります。
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
変更内容は、変更後すぐに適用されます。Alertmanager の例は、prometheus/alertmanager を参照してください。