Skip to content

Webhook Customization

Webhook customization is a versatile method for alert notifications. You can push alert events generated by TrueWatch to any system or platform that supports HTTP reception, enabling integration with internal operation systems, automation platforms, or third-party tools.

Configuration Steps

  1. Define the name for the current notification target, used for identification in the notification target list.
  2. Fill in the HTTP interface address for receiving alert notifications. When a monitor triggers an alert, TrueWatch will send a POST request to this address (❗️Please ensure the Webhook URL you fill in matches the selected notification platform type).
  3. Select the members to be sent along with the notification.
  4. Optionally test whether the notification has been sent (❗️Send a test message to the group/channel corresponding to this Webhook, and please check within the corresponding notification target to see if the test message was sent successfully).
  5. Configure operation permissions.
  6. Confirm.

Selecting Members

Select the members to be sent along with the notification. When sending a Webhook notification, the information of the selected members will also be sent externally, facilitating third-party systems to perform permission allocation or notification routing based on members.

The selectable members here include all teams and workspace members within the current workspace:

Notification Content

The final Webhook event notification sent externally contains the following content:

Event Information

bodyType is json text:

POST http://my-system/accept-webhook
Content-Type: application/json

{
    "timestamp"               : 1625638440,
    "df_status"               : "warning",
    "df_event_id"             : "event-xxxxxxxxxx",
    "df_title"                : "Issues with web001",
    "df_message"              : "Issues with web001\nCPU usage greater than 90\nMemory usage greater than 90",
    "df_dimension_tags"       : "{\"host\":\"web001\"}",
    "df_monitor_id"           : "monitor_xxxxxxxxxx",
    "df_monitor_name"         : "Anomaly Detection Name",
    "df_monitor_checker_id"   : "rul_xxxxxxxxxx",
    "df_monitor_checker_name" : "Anomaly Detection Item Name",
    "df_monitor_checker_value": "99",
    "df_event_link"           : "https://console.truewatch.com/keyevents/monitorChart?xxxxxxxxxx"
    "df_workspace_uuid"       : "wksp_xxxxxxxxxx",
    "df_workspace_name"       : "My Workspace",
    "Result"                  : 99,
    "...other fields": "omitted",

    // The following are legacy fields
    "date"          : 1625638440,
    "workspace_uuid": "wksp_xxxxxxxxxx",
    "workspace_name": "My Workspace",
}

Member Information

If members are configured, the Webhook will synchronously pass member information.

Synchronously Appending Workspace Attribute Claims

If the workspace has configured attribute claims, the relevant fields will be automatically appended to the notification content.

For more details, please refer to Attribute Claims.

Note

The content type for Webhook custom notifications only supports JSON format. For details on each field, please refer to Event Generation.

For more practical examples, please refer to TrueWatch Webhook Custom Alert Notification Integration.