Alerting
Be told when a consumer group falls behind, a connector fails or a partition loses replicas, without an extra monitoring stack.
Create your first alert
- In a cluster, open Alerting > Channels and add a channel (global administrator). Send a test message before you save it.
- Open Rules and create a rule: condition, threshold or duration, severity and channels (ADMIN on the cluster).
- Select Evaluate now, or wait: rules are evaluated every minute.
Rules
| Condition | Fires when | Needs |
|---|---|---|
| Consumer group lag | The total lag of a group is above the threshold. | Metrics turned on for the cluster |
| Consumer group stuck | A group does not commit on partitions that still receive messages. | Metrics turned on for the cluster |
| Connector or task failed | A Kafka Connect connector or one of its tasks is FAILED. | Kafka Connect status history |
| Under-replicated partitions | A topic has more partitions out of sync than the threshold. | |
| Partitions under min ISR | A topic has more partitions under min.insync.replicas than
the threshold. | |
| Test scenario failed | The last run of a test scenario failed. | A saved scenario |
- A filter limits the rule to some groups, topics or connectors. Each target has its own state.
- For (minutes): the condition must hold that long before the rule fires. Until then the alert is Pending.
- Cooldown: no new notification for the same target during that time, against flapping alerts (15 minutes by default).
- You get one notification when targets fire and one when they resolve.
- The lag is read from the snapshots taken every 5 minutes: KCM sends no extra request to the cluster.
Channels
- Webhook: KCM posts a JSON payload to your URL.
- Slack: an incoming webhook URL.
- Microsoft Teams: an incoming webhook URL of a workflow.
URLs and secrets are encrypted in the database and never shown again. If your receiver uses a private certificate authority, add it in Settings > Trusted certificates. Redirects are not followed.
Webhook payload
{
"source": "KCM",
"status": "FIRING",
"severity": "CRITICAL",
"title": "...",
"text": "...",
"rule": { "id": 12, "name": "Payments lag", "type": "CONSUMER_GROUP_LAG", "condition": "..." },
"cluster": { "id": 3, "name": "shop-prod-eu" },
"targets": [ { "key": "...", "name": "payments-app", "value": "...", "detail": "..." } ],
"omittedTargets": 0,
"occurredAt": "2026-11-30T09:15:00Z"
}
A notification lists 20 targets at most; omittedTargets counts the others.
Check that a call comes from KCM
- Header: KCM sends your secret in
X-KCM-Token, or in the header you name. - HMAC-SHA256: KCM sends the time in
X-KCM-Timestamp(epoch seconds) andX-KCM-Signature: sha256=<hex>, the HMAC-SHA256 of<timestamp>.<body>keyed by your secret.
import hashlib, hmac, time
def from_kcm(secret, headers, body):
timestamp = headers["X-KCM-Timestamp"]
if abs(time.time() - int(timestamp)) > 300:
return False
expected = hmac.new(secret.encode(), timestamp.encode() + b"." + body, hashlib.sha256).hexdigest()
return hmac.compare_digest("sha256=" + expected, headers["X-KCM-Signature"])
Use the raw bytes of the body, before any JSON parsing.
Notification bell
The bell of the header shows the alerts fired and resolved on every cluster you can see. The badge counts what you have not read, and is red while an alert is firing. A click selects the cluster and opens its Alerting page. The bell refreshes every minute while the browser tab is visible.
Permissions and retention
- Current alerts, history and bell: VIEWER on the cluster.
- Rules and Evaluate now: ADMIN on the cluster.
- Channels: global administrator.
- Every change and every test message is recorded in the audit trail, without any secret.
- The retention of the history and the timeout of the calls are in Settings > System > General, section Alerting.