- Web
- Chronoctl
- Terraform
- API
To create a webhook notifier:
- In the navigation menu select Alerts> Notifiers.
- Click Create notifier.
- Enter a descriptive name for the notifier.
- Select Webhook as the type of notifier you want to create.
-
In the URL field, enter a URL, which is called as a
POSTrequest. For example: - Optional: Select Notify when resolved to send a resolved alert notification.
- Click Save.
Webhook notifier request body
The following example outlines the body for aPOST request to a webhook. The
request consists of one triggered alert called "test alert" that has several
associated labels, such as component, instance, and job.
This example contains several notable sections:
commonLabels: Contains labels that are common across all alerts in a notification display. Each alerting series includes the full list of labels. Any static labels that you define also display undercommonLabels.groupLabels: Contains label values for the related signal display, in addition to a"severity"for the label.fingerprint: A representation of an alerting series, expressed as a deterministic value based on the hash of the labels.
Webhook signatures
Chronosphere webhooks include cryptographic signatures to ensure the authenticity and integrity of webhook requests.Headers
Every outbound webhook includes these security headers:-
Chronosphere-Webhook-Timestamp: The Unix timestamp of the time the webhook request was constructed. For example,1754255354. -
Chronosphere-Webhook-Signature-V1: At least one hex-encoded signature. Multiple comma-separated signatures can be included in the event of key rotation. This string always contains at least one comma, even if there is only one signature. This ensures that clients are splitting the header value by commas. Example value (note trailing comma):05908e247179fd822f2508907632cb1c57721691b688d72577a22dc46d183d21,.
Retrieve your signing key
If you are a member of a team with theSysAdmin
role, you can retrieve your signing key in the Observability Platform web app.
- Click your profile icon from the menu bar and select My Account.
- The Webhook Signing Key field displays your key, but its value is hidden. Click the reveal icon to reveal its value, and then click the copy icon to copy its value to your clipboard.
Signature algorithm
Signatures are generated using the HMAC-SHA256 algorithm with the following process:-
Construct the payload.
-
Generate the HMAC-SHA256 signature.
-
Set the hex encode.
Verify the signature
To verify a Chronosphere webhook signature:-
Extract the headers.
- Get the
Chronosphere-Webhook-Timestampheader value. Ensure the timestamp is within some tolerance. Chronosphere recommends a tolerance of five to 15 minutes. - Get the
Chronosphere-Webhook-Signature-V1header value. - Fail if either header is missing.
- Get the
-
Read the request body.
- Read the complete HTTP request body as bytes.
- Preserve the exact bytes. Disable any automatic parsing or formatting in your HTTP client.
-
Construct the verification payload.
Construct a verification payload using the following syntax:
-
Generate the expected signature.
- Use HMAC-SHA256 with your signing key.
- Hex-encode the result (lowercase).
-
Compare signatures.
- Split the signature header on commas.
- Trim whitespace from each signature.
- Skip empty values.
- Use
constant-timecomparison for each signature. - Accept if any signature matches.
Code sample
Webhook IP addresses
Chronosphere has established a list of static IP addresses which serve outbound webhook notification traffic. Use these addresses in your company’s allowlist to restrict traffic and maintain security. Chronosphere also provides a full list of IP addresses. Chronosphere doesn’t offer a published CIDR range. Chronosphere Observability Platform serves outbound webhook traffic for the following regions:- US
- EU
The following IP addresses serve traffic for the United States:
- 104.198.2.151
- 34.122.142.108
- 34.122.149.117
- 34.122.224.78
- 34.127.109.43
- 34.135.53.117
- 34.145.80.163
- 34.16.24.232
- 34.168.147.207
- 34.168.150.81
- 34.171.52.135
- 34.173.251.109
- 34.28.62.245
- 34.29.130.124
- 34.29.185.167
- 34.41.168.213
- 34.70.121.15
- 34.82.119.158
- 34.82.143.37
- 34.82.179.176
- 34.82.243.234
- 34.83.169.174
- 34.83.7.178
- 34.83.75.236
- 35.188.223.136
- 35.188.42.84
- 35.197.55.241
- 35.225.28.124
- 35.227.141.247
- 35.230.72.253
- 35.233.215.68
- 35.239.112.38