Skip to main content
Annotations provide runbook summaries, descriptions, and other text context for on-call engineers diagnosing issues. Use the separate Links section in the monitor editor to add templated URLs to dashboards, Logs Explorer, and external resources. Palo Alto Networks Cortex XCOR also supports link-valued annotations through Terraform, Chronoctl, or the Cortex XCOR API. For cross-telemetry linking patterns, see Create links to related information. Annotation values support two interchangeable forms: shorthand such as $value and $labels.LABEL, and the equivalent Go template form such as {{ .Value }} and {{ .Labels.LABEL }}. Use {{ .CommonLabels.LABEL }} to reference a monitor label, and {{ .Labels.LABEL }} to reference a label from the alerting metric. Replace LABEL with the label name.
Labels referenced in a variable must be present in the alerting time series. If a label is absent, the variable renders as empty in notifications.
Cortex XCOR provides these annotation variables: Use shorthand syntax to reference label names that contain dots, such as label.name. You can also use the humanize template function to format numeric values. For example, {{ $value | humanize }} renders 1500000 as 1.5M. For a reference list of alerting variables and templating functions, see the Alertmanager documentation. Annotation values support Markdown formatting, including bold text (**text**), inline code (`code`), named links ([label](url)), and plain HTTP URLs. Annotation values can also span multiple lines using the multiline annotation input. Each paragraph break renders as a new line in the monitor details view.

Add annotations to a monitor

To add annotations to a monitor:
  1. Create a monitor.
  2. In the Annotations section, add a description for your annotation in the Key field, and text or links in the Value field. For example, you might add the following key-value pairs as annotations: With Markdown formatting enabled, annotation values support richer formatting. For example, a description value might look like: