Configure alerts properties

Configure alerts properties for the type of alert notifications you want to use. Email notification is not enabled by default. Webhook notifications to PagerDuty and Slack are enabled by default.

You can use the Control Center properties files to automatically create an alert trigger and action pair to send notification when the Control Center cluster goes down.

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.

  1. 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 or files configured for your environments, including 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/.

  2. 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 or files configured for your environments, including 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:

  1. Add the following lines to the appropriate Control Center properties files for the environment.

    ...
    confluent.controlcenter.webhook.enable=true
    ...
    
  2. 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

An red banner appears at the top of every page when Control Center goes offline. This happens when the Kafka cluster Control Center uses is offline or unreachable.

There are properties you can set for this scenario that automatically creates a trigger and action pair. The confluent.controlcenter.alert.cluster.down.autocreate option combined with the action properties conveniently creates the trigger and action pair, which can be edited in the web Alerts UI.

To send an alert to recipients when the Control Center cluster goes offline, there are alternate ways to create it:

This section describes the setting the properties for auto-creating Control Center cluster down alerts.

Create an email alert with properties settings for cluster down

Auto-create a cluster down trigger and action email alert by configuring Control Center properties. You can edit the auto-created trigger and action pair in the Alerts UI.

Prerequisites:

Note

Make the change in the appropriate Control Center properties file or files configured for your environments, including 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/.

  1. Add the following lines to the appropriate Control Center properties files for the environment.

    # 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
    
  2. 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
    

Create a Slack webhook alert with properties settings for cluster down

Auto-create a cluster down trigger and action Slack alert by configuring Control Center properties. You can edit the auto-created trigger and action pair in the Alerts UI.

Prerequisites:

  • Configure and test the incoming webhook URL in Slack.
  • Ensure the webhook Control Center configuration setting is enabled (it is by default). See enable the webhook action.

Note

Make the change in the appropriate Control Center properties file or files configured for your environments, including 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/.

  1. Add the following lines to the appropriate Control Center properties files for the environment.

    # 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
    
  2. 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
    

Create a PagerDuty incident with properties settings for cluster down

Auto-create a cluster down trigger and action PagerDuty notification by configuring Control Center properties. You can edit the auto-created trigger and action pair in the Alerts UI.

Prerequisites:

Note

Make the change in the appropriate Control Center properties file or files configured for your environments, including 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/.

  1. Add the following lines to the appropriate Control Center properties files for the environment.

    # 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
    
  2. 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