Alertmanager templating
Templating can be one of the most difficult-to-grasp concepts within Alertmanager for those unfamiliar with the Go templating language. Prometheus and Alertmanager use Go’s templating engine under the hood with some additional convenience functions added in. Consequently, you likely have some exposure to it through writing Prometheus alerting rules already since Go templating is often used to dynamically substitute label and series values in alerts. For example, see the following:
annotations: description: Configuration failed to load for {{ $labels.namespace }}/{{ $labels.pod}}.
Prometheus runs the alert annotation fields through a templating engine that enables that description to be rendered dynamically based on the labels attached to the alert. However, the usage of templating in Alertmanager often extends beyond just...