CONFLUENT PLATFORM
Follow these examples to set up triggers and actions.
This section provides trigger examples using the Control Center web UI for alerts.
Follow these steps to create an alert trigger for cluster down using the UI rather than the properties file configurations.
Click the Alerts bell icon in the top banner. The Alerts page opens to the History tab by default.
Click the Trigger tab.
Click + New trigger.
In the General field, enter a unique name for the trigger. For example, Cluster down.
Cluster down
Note
Uniqueness is not enforced. As a recommended best practice, use unique and descriptive names to avoid confusion.
In the Components fields:
In the Criteria fields:
Click Save. The trigger saved message appears and prompts you to create or select an action now or do it later.
Create a corresponding action or actions for the trigger as applicable to your environment.
For next steps, see the cluster down action examples:
Follow these steps to create an alert trigger for any under-replicated topic partitions (URP) in a cluster. Alert on topic partitions when the number of in-sync replicas is less than replication factor. The number of in sync replicas should equal the total number of replicas. Investigate whenever the under replicated partitions value is greater than zero (0).
This example creates a cluster trigger. The under-replicated topic partitions metric is also available for a topic trigger.
To create a cluster trigger for URP:
In the General field, enter a unique name for the trigger. For example, URP my_cluster.
URP my_cluster
Cluster
Warning
There is a known issue when multiple clusters are selected for a broker or cluster trigger. As a recommended best practice, only select a single cluster for the trigger. For more information, see the known issues section in the release notes.
Under-replicated topic partitions
Greater than
0
Follow these steps to create an alert trigger for under-replicated partitions (URP) in a specific topic.
This example creates a topic trigger. The under-replicated topic partitions metric is also available for a cluster trigger.
To create a topic trigger for URP:
In the General field, enter a unique name for the trigger. For example, URP users topic.
URP users topic
Topic
Equals
Follow these steps to create an alert trigger for consumer lag in a specific consumer group. Consumer lag measures how many messages a consumer group is behind. This example sets up the alert from the context of the Consumer groups page. Most of the fields are already pre-populated. Just enter a trigger name and the lag value you want to alert on as appropriate for your environment. This example triggers an alert when the consumer lag is greater than 100.
Consumer group alerts in Confluent Control Center are based on the total cumulative lag for all partitions in all topics consumed in a Consumer group.
To create a consumer lag trigger:
From the navigation menu, click the tile for your desired cluster.
Click Consumers.
Click the link for the consumer group. The Consumer lag tab appears.
Consumer lag page set up an alert
Click the Set up an alert button. The New trigger form appears with most fields pre-populated.
Enter a unique name for the trigger. For example, Consumer group lag.
Consumer group lag
100
Consumer lag consumer group trigger example
This section provides action examples using the web UI for alerts.
Follow these steps to create an email action that can be assigned to one or more triggers. This example creates an action to send an email alert for cluster down once per hour.
Prerequisites:
To create an email action:
Click the Actions tab.
Click + New action.
In the General tab, enter a unique name for the action. For example, Send email to DevOps.
Send email to DevOps
(Optional) The action is enabled by default. Switch the Enabled toggle to Disabled if you are not ready to activate the action. The action remains disabled regardless of the pause or resume all actions status.
From the Triggers list, select one or more triggers to assign to the Action.
In the Actions fields:
Attention DevOps: Control Center Cluster Down Alert!
1
Per hour
Click Save. The action is added to the Actions management page.
Follow these steps to create a Slack webhook action that can be assigned to one or more triggers. This example creates a Slack notification to post to a designated Slack channel once per day until the issue is acknowledged and resolved.
To create a Slack action:
In the General tab, enter a unique name for the action. For example, Control Center Cluster down Slack webhook.
Control Center Cluster down Slack webhook
From the Triggers list, select one or more triggers to assign to the action.
Per day
@otherslackusername
#DevOpsOnCall
Follow these steps to create a PagerDuty webhook notification action that can be assigned to one or more triggers. This example creates a PagerDuty notification to create a critical incident for Control Center’s cluster down.
Configure the PagerDuty Service integration and generate an Integration Key. Refer to the PagerDuty documentation for complete details.
Ensure the webhook Control Center configuration setting is enabled (it is by default). See enable the webhook action.
Create one or more triggers to associate the action with. For this example, see Create a trigger for Control Center cluster down.
To create a PagerDuty action:
In the General field, enter a unique name for the action. For example, Control Center Cluster down PagerDuty incident.
Control Center Cluster down PagerDuty incident
Send PagerDuty notification
Critical