Configure Control Center Alerts for Confluent Platform¶
You can configure alert properties for the type of alert notifications you want to use. By default, webhook notifications to PagerDuty and Slack are enabled and email notifications are not enabled.
Create an alert trigger and action pair to send notification when the Control Center cluster goes down. For more information, see Control Center cluster down status.
Enable email alerts¶
The Alerts email action is not enabled by default. After enabling the feature, the email action is available in the Actions form of the Control Center Alerts UI.
In the appropriate
control.center.properties
file for your environment, uncomment (remove the hash#
from) the#confluent.controlcenter.mail.enabled=true
configuration property.... confluent.controlcenter.mail.enabled=true ...
Note
Make the change in the appropriate Control Center properties file(s) configured for your environments, which could include
control-center.properties
,control-center-dev.properties
,control-center-production.properties
, andcontrol-center-minimal.properties
. The properties files are located in/path-to-confluent/etc/confluent-control-center/
.Restart Control Center and pass in the properties file for the configuration to take effect:
./bin/control-center-stop ./bin/control-center-start ../etc/confluent-control-center/control-center.properties
You also must configure SMTP email settings as appropriate for your environment.
To disable the email action again, set the option to false
(or comment it
out in the properties file) and restart Control Center with the updated properties
file.
Tip
To temporarily pause alerts, click the Pause all actions toggle in the Alerts -> Actions page. For more details, see Pause and resume all alerts actions. To disable a particular action, click the disabled toggle in the Action form.
Configure SMTP email¶
Before you can send email alert notification actions, you must enable Email settings and properly configure Control Center to communicate with your SMTP server.
At a minimum, you must set the following in the appropriate properties files:
# 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
Additional recommended email settings, including security:
# 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
Enable or disable webhook alerts feature¶
The Alerts webhook action is enabled by default. The webhook notification action is available in the Actions form of the Control Center UI. Supported webhooks include Slack and PagerDuty notifications.
Note
Make the change in the appropriate Control Center properties file(s)
configured for your environments, which could include control-center.properties
,
control-center-dev.properties
, control-center-production.properties
,
and control-center-minimal.properties
. The properties files
are located in /path-to-confluent/etc/confluent-control-center/
.
To enable webhook alerts:
Add the following lines to the appropriate Control Center properties files for the environment.
... confluent.controlcenter.webhook.enabled=true ...
Restart Control Center and pass in the properties file for the configuration to take effect:
./bin/control-center-stop ./bin/control-center-start ../etc/confluent-control-center/control-center.properties
To disable the webhook action, set the option to false
and restart
Control Center with
the updated properties file.
Control Center cluster down status¶
You may have noticed that when the Kafka cluster running Control Center is offline or unreachable, a red banner appears at the top of every Control Center page. Similarly, you can configure alert notifications to be sent automatically to users when the cluster that Control Center is running on goes down.
Note
If you are running a single cluster, Control Center will not send cluster down alerts.
To send an alert to recipients when the cluster goes offline, create a trigger and action using Control Center. For more information, see the following topics: