Idea is to customize notifications based on what the alert is about (e.g. from node_exporter, k8s etc.), because they generally have different labels that are useful, and it would be preferable to not print all of the labels or all of the common labels for alerts, but only valuable labels, described in specific template variables.
To that end, is it possible to reference a template variable by a label from the alert?
For example something like (this does not work):
receivers:
- name: 'slack-notifications'
slack_configs:
- channel: '#alerts'
text: |-
{{ range .Alerts }}
*Summary:* {{ .Annotations.summary }}
*Description:* {{ .Annotations.description }}
{{ template .Labels.template . }}
{{ end }}
Maybe there's a different approach to customize alert content and not write a separate receiver for each?