Skip to main content
Use templated links on monitors to send responders from an alert to the right dashboard view, log query, or external runbook. Each link interpolates template variables from the alerting signal’s labels when the alert triggers, so every alert opens a destination scoped to its own cluster, namespace, pod, or other dimensions. Responders open expanded links from Additional information on the alert details page. In the monitor editor, Annotations hold text notes such as runbook summaries. Links hold URL-valued annotations that Observability Platform renders as clickable links on monitor and alert detail pages. Link names become annotation keys. They must use only letters, numbers, and underscores, and can’t start with a number. When the Links section is enabled in the monitor editor, Observability Platform displays URL-valued annotations from existing monitors in Links rather than in Annotations. Saving the monitor preserves those entries in annotations. SLOs also support the Links section in the SLO Definition drawer when this feature is enabled. SLO links use the same link types but don’t interpolate template variables during editing because SLOs have no live preview signal. See Labels and annotations for the separate SLO annotations workflow. Add dashboard, log, or external links in the monitor editor Links section, or set URL-valued entries on the monitor’s annotations map when you define the monitor in code. Select the tab for your workflow. In the Chronoctl, Terraform, and API tabs, a Pod restarts monitor includes two templated links in annotations: dashboard and error_logs. The sample values in this section match those code examples. Replace TENANT with your tenant subdomain. For DASHBOARD_SLUG, open the dashboard, click Copy URL in the page header, and use the path segment after /dashboards/. For template syntax and URL patterns, see Construct link URLs. Value for the dashboard annotation:
https://TENANT.chronosphere.io/dashboards/DASHBOARD_SLUG?var-cluster={{ $labels.chronosphere_k8s_cluster }}&var-namespace={{ $labels.namespace }}
Logs query that the code examples encode into the error_logs annotation URL:
severity="ERROR" AND service="{{ $labels.service }}" AND kubernetes.namespace="{{ $labels.namespace }}"
Reference labels from the alerting time series with Prometheus Alertmanager template syntax. Observability Platform expands variables when an alert triggers and when responders view links on alert detail pages. Use either of these forms to read a label from the alerting series:
  • {{ $labels.LABEL }}
  • {{ .Labels.LABEL }}
Replace LABEL with the label name, such as namespace or chronosphere_k8s_cluster. Labels referenced in a template must be present on the alerting time series. Missing labels display as the template string, such as {{ $labels.missing_label }}. the variable renders as empty in the expanded link. For a full list of alerting variables and templating functions, see the Alertmanager documentation. Select Dashboard as the link type to scope a dashboard to the alerting signal. Choose a dashboard from the Dashboard name dropdown. For native dashboards, Observability Platform populates Dashboard variables with the dashboard’s configured variables and maps each to a signal label using ${LABEL} tokens. For classic (Grafana) dashboards, an info banner indicates that variables aren’t available from the dashboard configuration. Click + Add variable to add custom variable mappings. Click a variable’s Values field to select from available signal labels, or type a literal value. Edit or delete existing variable mappings as needed. The Link preview updates as you configure variables, showing the constructed URL with interpolated template variables where signal labels are available. Omit start, end, from, and to from dashboard and Logs Explorer URLs when you want the alert page’s time range to apply when a responder clicks the link. If the URL already includes any of those parameters, Observability Platform leaves them unchanged. When you use the Logs link type in the monitor editor, enter the query in plain logging query syntax and embed template variables where you want per-signal values. The sample logs query in Add links to a monitor is what the error_logs annotation encodes in Chronoctl, Terraform, and API definitions. Observability Platform encodes the query into a Logs Explorer URL and preserves {{ ... }} expressions for expansion at alert time. To construct a logs URL manually instead, see Create links to log data.