Notification Template Reference

The notifications sent to receivers are constructed via templates. The Alertmanager comes with default templates but they can also be customized. To avoid confusion it’s important to note that the Alertmanager templates differ from , however Prometheus templating also includes the templating in alert rule labels/annotations.

The Alertmanager’s notification templates are based on the Go templating system. Note that some fields are evaluated as text, and others as HTML which will affect escaping.

Data Structures

The Alerts type exposes functions for filtering alerts: - Alerts.Firing returns a list of currently firing alert objects in this group - returns a list of resolved alert objects in this group

Alert holds one alert for notification templates.

Annotation example containing two annotations:

  1. summary: "alert summary",
  2. description: "alert description",

In addition to direct access of data (labels and annotations) stored as KV, there are also methods for sorting, removing, and viewing the LabelSets:

Functions