Subscribe via Webhook



TiDB Cloud provides you with an easy way to subscribe to alert notifications via a Generic Webhook, email, Slack, Zoom, Flashduty, and PagerDuty. This document describes how to subscribe to alert notifications via a generic webhook.

Prerequisites

  • The subscribing via webhook feature is only available for organizations that subscribe to the Enterprise or Premium support plan.

  • You need a webhook URL from the platform where you want to receive alert notifications on (for example, Telegram, Microsoft Teams, or your own on-call system that accepts HTTP POST requests with a JSON payload). Currently, TiDB Cloud does not support customizing the request headers or the payload format. For the payload format, see Webhook payload.

  • To subscribe to alert notifications of TiDB Cloud, you must have the Organization Owner access to your organization or Project Owner access to the target project in TiDB Cloud.

Subscribe to alert notifications

Alert notification subscriptions vary by your TiDB Cloud plan.

To subscribe to alert notifications of TiDB Cloud Dedicated clusters, take the following steps:

  1. In the TiDB Cloud console, navigate to the My TiDB page of your organization, and then click the Project view tab.

  2. In the project view, locate your target project, and then click for the project.

  3. In the left navigation pane, click Alert Subscription under Project Settings.

  4. On the Alert Subscription page, click Add Subscriber in the upper-right corner.

  5. Select Webhook from the Subscriber Type drop-down list.

  6. Enter a name in the Name field and your webhook URL in the Webhook URL field.

  7. Click Save. The backend will test connection and save for you.

    If the test fails, an error message is displayed. Follow the message to troubleshoot the issue and retry the connection.

Alternatively, you can also click Subscribe in the upper-right corner of the Alert page of the target TiDB Cloud Dedicated cluster. You will be directed to the Alert Subscription page.

If an alert condition remains unchanged, the alert sends notifications every three hours.

Webhook payload

TiDB Cloud sends each alert notification to your webhook URL as an HTTP POST request with a JSON body. The payload structure is similar to the Alertmanager webhook format. For the fields sent by TiDB Cloud, see Payload fields.

Endpoint requirements

  • The webhook URL must use http or https, be accessible from the public internet, and contain no more than 255 characters.
  • The webhook URL cannot contain a username or password.
  • The endpoint must return a 2xx status code within 15 seconds. Redirects are not followed.

Payload fields

FieldTypeDescription
receiverStringThe receiver name. The value is always webhook.
statusStringThe alert status. Valid values are firing and resolved.
alertsArrayThe alert list. Each request contains exactly one alert.
alerts[].statusStringThe alert status. Same as status.
alerts[].labels.clusterStringThe name of the cluster or instance.
alerts[].labels.severityStringThe alert severity, such as critical, warning, or info.
alerts[].labels.projectStringThe name of the project. Only available for TiDB Cloud Dedicated clusters.
alerts[].annotations.alertnameStringThe alert title.
alerts[].annotations.messageStringThe alert details. The value might contain HTML tags.
alerts[].startsAtStringThe time when the alert is triggered, in RFC 3339 format.
alerts[].endsAtStringThe time when the alert is resolved, in RFC 3339 format. Only available when status is resolved.
groupKeyStringThe identifier of the alert. Notifications of the same alert share the same value. Optional.
groupLabelsObjectThe same as alerts[].labels, without project.
commonLabelsObjectThe same as alerts[].labels, without project.
commonAnnotationsObjectThe same as alerts[].annotations, without message.
dryRunBooleanWhether the request is a connection test. Only available in test notifications, with the value true.

Payload example

The following example is for a TiDB Cloud Dedicated cluster. The project field is not included in payloads for TiDB Cloud Essential or Premium instances.

{ "receiver": "webhook", "status": "firing", "alerts": [ { "status": "firing", "labels": { "cluster": "Cluster0", "severity": "warning", "project": "default project" }, "annotations": { "alertname": "Total TiKV CPU usage is too high", "message": "The total CPU usage of TiKV nodes in cluster Cluster0 has exceeded 80% for 10 minutes." }, "startsAt": "2026-10-10T08:00:00Z" } ], "groupKey": "a1b2c3d4e5f60718", "groupLabels": { "cluster": "Cluster0", "severity": "warning" }, "commonLabels": { "cluster": "Cluster0", "severity": "warning" }, "commonAnnotations": { "alertname": "Total TiKV CPU usage is too high" } }

Notification behavior

  • When an alert is triggered, TiDB Cloud sends a notification with status set to firing. If the alert condition remains unchanged, the notification is sent again every three hours.
  • When an alert is resolved, TiDB Cloud sends a notification with status set to resolved.
  • If a request fails due to a network error or the endpoint returns 429 or 5xx, TiDB Cloud retries the request up to two times. Your endpoint might receive the same notification more than once.
  • When you save a webhook subscriber, TiDB Cloud sends a test notification with dryRun set to true. The subscriber is saved only if the test succeeds.

Unsubscribe from alert notifications

If you no longer want to receive alert notifications, take the following steps. The steps vary by your TiDB Cloud plan.

  1. In the TiDB Cloud console, navigate to the My TiDB page of your organization, and then click the Project view tab.
  2. In the project view, locate your target project, and then click for the project.
  3. In the left navigation pane, click Alert Subscription under Project Settings.
  4. On the Alert Subscription page, locate the row of your target subscriber to be deleted, and then click ... > Unsubscribe.
  5. Click Unsubscribe to confirm the unsubscription.

Was this page helpful?