アラートプロパティの構成¶
使用するアラート通知のタイプに合わせてアラートプロパティを構成します。メール通知はデフォルトで有効になりません。PagerDuty および Slack への Webhook 通知はデフォルトで有効になります。
Control Center プロパティファイルを使用することにより、Control Center クラスターの停止時に通知を送信するアラートトリガーとアクションのペアを自動で作成できます。
メールアラートの有効化¶
アラートメールアクションはデフォルトで有効になりません。この機能を有効にした場合、メールアクションは Control Center Alerts UI の Actions フォームで使用できます。
ご使用の環境に適した
control.center.properties
ファイル内で#confluent.controlcenter.mail.enabled=true
構成プロパティをコメント解除(ハッシュ記号(#
)を削除)します。... confluent.controlcenter.mail.enabled=true ...
注釈
ご使用の環境向けに構成されている 1 つ以上の適切な Control Center プロパティファイルに変更を加えます。対象のプロパティファイルには
control-center.properties
、control-center-dev.properties
、control-center-production.properties
、control-center-minimal.properties
があります。プロパティファイルは/path-to-confluent/etc/confluent-control-center/
にあります。Control Center を再起動し、プロパティファイルを渡して構成を有効にします。
./bin/control-center-stop ./bin/control-center-start ../etc/confluent-control-center/control-center.properties
ご使用の環境に合わせて SMTP メール設定 も構成する必要があります。
メールアクションを再度無効にするには、このオプションを false
に設定(またはプロパティファイルでコメントアウト)し、更新したプロパティファイルを使用して Control Center を再起動します。
ちなみに
アラートを一時的に一時停止するには、Alerts ページから Actions ページに移動して、Pause all actions トグルボタンをクリックします。詳細については、「すべてのアラートアクションの一時停止と再開」を参照してください。特定のアクションを無効にするには Action フォームで disabled トグルボタンをクリックします。
SMTP メールの構成¶
メールアラート通知アクションを送信するためには、「メール設定」を有効にしておくことと、ご使用の SMTP サーバーと通信するように Control Center を適切に構成しておくことが必要です。
最低限、適切なプロパティファイルに以下の内容を設定する必要があります。
# host name of your mail server
confluent.controlcenter.mail.host.name=mymail.server
# port your mail server is running on
confluent.controlcenter.mail.port=587
# email from address
confluent.controlcenter.mail.from=kafka-monitor@example.com
# Confluent also recommends setting advertised.url and rest.listeners
# explicitly because
# they will control the Control Center alerts history link that is embedded
# in the body of alerts
confluent.controlcenter.rest.advertised.url=myExternalHost
confluent.controlcenter.rest.listeners=control-center.server
セキュリティを含む、追加の推奨メール設定:
# Username and password for username/password authentication
confluent.controlcenter.mail.username=myusername
confluent.controlcenter.mail.password=xxxxxxxx
# Forces using STARTTLS
confluent.controlcenter.mail.starttls.required=true
# Forces validation of server's certificate when using STARTTLS or SSL
confluent.controlcenter.mail.ssl.checkserveridentity=true
# Overrides confluent.controlcenter.mail.from when email bounced
confluent.controlcenter.mail.bounce.address=mybackupbounceemail@example.com
Webhook アラート機能の有効化または無効化¶
アラート Webhook アクションはデフォルトで有効になります。Webhook 通知アクションは Control Center UI の Actions フォームで使用できます。サポートされている Webhook は Slack 通知および PagerDuty 通知です。
注釈
ご使用の環境向けに構成されている 1 つ以上の適切な Control Center プロパティファイルに変更を加えます。対象のプロパティファイルには control-center.properties
、control-center-dev.properties
、control-center-production.properties
、control-center-minimal.properties
があります。プロパティファイルは /path-to-confluent/etc/confluent-control-center/
にあります。
Webhook アラートを有効にするには、以下の手順に従います。
環境に対応する適切な Control Center プロパティファイルに以下の行を追加します。
... confluent.controlcenter.webhook.enable=true ...
Control Center を再起動し、プロパティファイルを渡して構成を有効にします。
./bin/control-center-stop ./bin/control-center-start ../etc/confluent-control-center/control-center.properties
Webhook アクションを無効にするには、このオプションを false
に設定し、更新したプロパティファイルを使用して Control Center を再起動します。
Control Center クラスターダウンステータス¶
Control Center がオフラインになるとすべてのページの先頭に赤いバナーが表示されます。これが発生するのは、Control Center で使用している Kafka クラスターがオフラインであるか到達できない場合です。
トリガーとアクションのペアを自動で作成する、このシナリオ用に設定できるプロパティがあります。confluent.controlcenter.alert.cluster.down.autocreate
オプションとアクションプロパティの組み合わせによって、トリガーとアクションのペアが簡単に作成されます。このペアはウェブ Alerts UI で編集できます。
Control Center クラスターがオフラインになるときにアラートを受信者に送信する場合は、以下の代替方法を利用してこのペアを作成することができます。
- Control Center プロパティファイル内でクラスターダウン設定を構成します。優先する通知のタイプについては、「クラスターダウン用のプロパティ設定を使用してメールアラートを作成する」、「クラスターダウン用のプロパティ設定を使用して Slack Webhook アラートを作成する」、および「クラスターダウン用のプロパティ設定を使用して PagerDuty インシデントを作成する」を参照してください。
- Control Center ウェブアプリケーションの Alerts UI を使用してトリガーおよびアクションを作成します。「Control Center クラスターダウン用のトリガーを作成する」、「クラスターダウン用のメールアクションを作成する」、「クラスターダウン用の Slack 通知アクションを作成する」、および「クラスターダウン用の PagerDuty 通知アクションを作成する」を参照してください。
このセクションでは、Control Center クラスターダウンアラートを自動作成するためのプロパティの設定について説明します。
クラスターダウン用のプロパティ設定を使用してメールアラートを作成する¶
Control Center プロパティを構成してクラスターダウントリガーおよびアクションメールアラートを自動作成します。自動作成されたトリガーおよびアクションのペアは Alerts UI を使用して編集できます。
前提条件:
注釈
ご使用の環境向けに構成されている 1 つ以上の適切な Control Center プロパティファイルに変更を加えます。対象のプロパティファイルには control-center.properties
、control-center-dev.properties
、control-center-production.properties
、control-center-minimal.properties
があります。プロパティファイルは /path-to-confluent/etc/confluent-control-center/
にあります。
環境に対応する適切な Control Center プロパティファイルに以下の行を追加します。
# Automatically create Control Center cluster down trigger and action pair # during start up confluent.controlcenter.alert.cluster.down.autocreate=true confluent.controlcenter.alert.cluster.down.to.email=emailOnCall@example.com,emailDevOps@example.com confluent.controlcenter.alert.cluster.down.send.rate=12
Control Center を再起動し、プロパティファイルを渡して構成を有効にします。
./bin/control-center-stop ./bin/control-center-start ../etc/confluent-control-center/control-center.properties
クラスターダウン用のプロパティ設定を使用して Slack Webhook アラートを作成する¶
Control Center プロパティを構成してクラスターダウントリガーおよびアクション Slack アラートを自動作成します。自動作成されたトリガーおよびアクションのペアは Alerts UI を使用して編集できます。
前提条件:
- Slack 内で Incoming Webhook URL を構成してテストします。
- Webhook Control Center 構成設定が有効になっていることを確認します(デフォルトでは有効です)。「Webhook アクション有効化」を参照してください。
注釈
ご使用の環境向けに構成されている 1 つ以上の適切な Control Center プロパティファイルに変更を加えます。対象のプロパティファイルには control-center.properties
、control-center-dev.properties
、control-center-production.properties
、control-center-minimal.properties
があります。プロパティファイルは /path-to-confluent/etc/confluent-control-center/
にあります。
環境に対応する適切な Control Center プロパティファイルに以下の行を追加します。
# Automatically create Control Center cluster down trigger and action pair # during start up confluent.controlcenter.alert.cluster.down.autocreate=true confluent.controlcenter.alert.cluster.down.to.webhookurl.slack=https://hooks.slack.com/services/mywebhookurl confluent.controlcenter.alert.cluster.down.send.rate=12
Control Center を再起動し、プロパティファイルを渡して構成を有効にします。
./bin/control-center-stop ./bin/control-center-start ../etc/confluent-control-center/control-center.properties
クラスターダウン用のプロパティ設定を使用して PagerDuty インシデントを作成する¶
Control Center プロパティを構成してクラスターダウントリガーおよびアクション PagerDuty 通知を自動作成します。自動作成されたトリガーおよびアクションのペアは Alerts UI を使用して編集できます。
前提条件:
- PagerDuty のドキュメント に従って統合キーを生成します。
- Webhook Control Center 構成設定が有効になっていることを確認します(デフォルトでは有効です)。「Webhook アクション有効化」を参照してください。
注釈
ご使用の環境向けに構成されている 1 つ以上の適切な Control Center プロパティファイルに変更を加えます。対象のプロパティファイルには control-center.properties
、control-center-dev.properties
、control-center-production.properties
、control-center-minimal.properties
があります。プロパティファイルは /path-to-confluent/etc/confluent-control-center/
にあります。
環境に対応する適切な Control Center プロパティファイルに以下の行を追加します。
# Automatically create Control Center cluster down trigger and action pair # during start up confluent.controlcenter.alert.cluster.down.autocreate=true confluent.controlcenter.alert.cluster.down.to.pagerduty.integrationkey=myintegrationkey confluent.controlcenter.alert.cluster.down.send.rate=12
Control Center を再起動し、プロパティファイルを渡して構成を有効にします。
./bin/control-center-stop ./bin/control-center-start ../etc/confluent-control-center/control-center.properties