Skip to content

Instantly share code, notes, and snippets.

@SathyaBhat
Last active July 2, 2020 14:10
Show Gist options
  • Save SathyaBhat/837e681390f389718377d0f953c2fc48 to your computer and use it in GitHub Desktop.
Save SathyaBhat/837e681390f389718377d0f953c2fc48 to your computer and use it in GitHub Desktop.
Iterate through all common annotations and labels in AlertManager templates
*Common Annotations*
{{ range .CommonAnnotations.SortedPairs }} • *{{ .Name }}:* `{{ .Value }}`
{{ end }}
*Common Labels*
{{ range .CommonLabels.SortedPairs }} • *{{ .Name }}:* `{{ .Value }}`
{{ end }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment