Dash0 Raises $110M Series B at $1B Valuation

Last updated: May 30, 2026

Optimize Alert Messages with Templates

Reference guide for variables and template functions in Dash0 check rules. Use these to create dynamic, contextual alert messages with automatic formatting for better incident response.

Overview

Dash0's check rules support dynamic content through variables and template functions in the summary and description fields. This templating system, compatible with Prometheus conventions, allows you to create contextual alert messages that automatically include relevant information from the failing check.

When a check rule detects an issue, you can reference specific label values and the actual metric value that caused the alert. Template functions then help format this data for better readability in notifications.

Reference Available Variables

Use these variables to dynamically include metric values and label data in your alert messages. Dash0 provides three primary variables for use in check rule templates:

  • $threshold contains the threshold value that was exceeded (either degraded or critical, whichever fired). This is the value you configured in the Thresholds section of the check rule.
  • $value contains the actual numerical value that caused the check to fail. This represents the last evaluated metric value that exceeded your defined threshold.
  • $labels.<key> references any label value associated with the alert. Replace <key> with the actual label name. For example, $labels.service_name retrieves the service name, while $labels.k8s_pod_name gets the pod name.

Where labels come from:

Labels available in $labels come from two sources:

  1. Query results: Labels projected by your PromQL query (visible in the evaluation preview chart)
  2. Check rule labels: Custom labels added to the check rule in the Additional Labels section

You can use these variables in both the summary and description fields of your check rules. They are replaced with actual values when the alert fires, providing specific context about what triggered it.

Format Values with Template Functions

Dash0's templating system is compatible with Prometheus Alertmanager template functions, providing numerical and string formatting capabilities. The following functions can be used to format values in alert messages:

Numerical Formatting

  • humanize converts large numbers into readable formats using decimal-based units. For example, 1000 becomes 1k, and 1000000 becomes 1M.
  • humanize1024 applies binary-based formatting, commonly used for data sizes. It converts values like 1024 to 1Ki and 1048576 to 1Mi, following IEC binary prefix standards.
  • humanizeDuration transforms seconds into human-readable time formats. A value of 3661 becomes 1h 1m 1s.
  • humanizePercentage formats decimal values as percentages. For instance, 0.85 becomes 85%.

String Formatting

  • title capitalizes the first letter of each word in the string.
  • toUpper converts the entire string to uppercase.
  • toLower converts the string to lowercase.
Note

Template function autocomplete is not available in the UI editor, but the functions are supported when alerts are sent. Refer to the Prometheus Alertmanager template reference for the complete list of available functions.

Apply Template Functions

Combine variables with template functions using the pipe operator to format values for better readability in notifications. Template functions wrap variables using the {{ }} syntax:

text
1
CPU usage is {{ $value | humanizePercentage }} on service {{ $labels.<service_name> }}
text
1
Alert triggered for {{ $labels.<deployment_environment_name> | title }} environment in {{ $labels.<cloud_region> | toUpper }}
text
1
Memory usage has reached {{ $value | humanize1024 }}B on pod {{ $labels.<k8s_pod_name> }} in namespace {{ $labels.<k8s_namespace> }}

Further Reading

  • About Alert Monitoring — Overview of Dash0's alerting capabilities and how check rules monitor your systems.
  • Create Check Rules — Set up check rules to monitor metrics, logs, spans, and web events using PromQL expressions and threshold values.
  • Send Check Rule Notifications — Configure notification channels to keep your team informed when checks fail.
  • How the Alerting Model Works — Reference guide for Dash0's extension of the Prometheus alerting model with degraded and critical severity thresholds.