Documentation Index
Fetch the complete documentation index at: https://docs.chronosphere.io/llms.txt
Use this file to discover all available pages before exploring further.
This feature isn’t available to all Chronosphere Observability Platform users and
might not be visible in your app. For information about enabling this feature in your
environment, contact Chronosphere Support.
- Title: The subject line or heading of the notification.
- Description: The body text of the notification.
notification_template field definition, see the
monitor data model.
Set a notification template
Add anotification_template block when creating or updating a monitor.
- Chronoctl
- Terraform
- API
Include a
notification_template block in your monitor YAML when running
chronoctl monitors create or chronoctl monitors update. For more
information, see Chronoctl.Error rate alert example
The following template uses severity and label variables to produce a notification title and description.payments service in production, Chronosphere
Observability Platform renders the notification as:
Template variables
Reference variables with dot notation, for example,{{.Severity}}.
| Variable | Type | Description |
|---|---|---|
.Severity | string | Alert severity: "critical" or "warn". |
.Status | string | Alert state: "firing" or "resolved". |
.Labels.<name> | string | Signal labels attached to the alert. For example, .Labels.env or .Labels.service. |
.Threshold | number | Threshold value for the active severity condition. |
.ThresholdOp | string | Comparison operator for the active condition. For example, ">=" or "<". |
.ResolveThreshold | number | Effective resolve threshold. Defaults to .Threshold when no separate resolve threshold is configured. |
.StartsAtEpoch | integer | Start time of the earliest alert in .Alerts, in epoch milliseconds. |
.Alerts | list | All alerts in the notification group. See Alert object fields. |
.Alerts.Firing | list | Subset of .Alerts that are currently firing. |
.Alerts.Resolved | list | Subset of .Alerts that have resolved. |
Alert object fields
Each item in.Alerts, .Alerts.Firing, and .Alerts.Resolved exposes the
following fields:
| Field | Type | Description |
|---|---|---|
.Status | string | Alert state: "firing" or "resolved". |
.Labels | map | Per-alert label key/value pairs. |
.Annotations | map | Per-alert annotation key/value pairs. |
.Threshold | number | Per-alert threshold value. |
.ThresholdOp | string | Per-alert comparison operator. |
.ResolveThreshold | number | Per-alert effective resolve threshold. |
.StartsAt | timestamp | Time the alert started firing. |
.EndsAt | timestamp | Time the alert resolved, if applicable. |
Template functions
In addition to the standard Go template built-ins, the following functions are available.Arithmetic
| Function | Description | Example |
|---|---|---|
add | Adds two integers. | {{add 1 2}} returns 3 |
sub | Subtracts two integers. | {{sub 5 3}} returns 2 |
mul | Multiplies two integers. | {{mul 3 4}} returns 12 |
String manipulation
| Function | Description | Example |
|---|---|---|
toUpper | Converts a string to uppercase. | {{toUpper .Labels.env}} returns PRODUCTION |
toLower | Converts a string to lowercase. | {{toLower .Labels.env}} returns production |
title | Title-cases a string. | {{title .Labels.env}} returns Production |
join | Joins a string slice with a separator. | {{join .Labels.regions ", "}} |
match | Returns true if a string matches a regular expression. | {{match "^prod" .Labels.env}} |
reReplaceAll | Replaces all regexp matches in a string. | {{reReplaceAll "-" "_" .Labels.service}} |

