Grafana contact point subject

in anotation work fine
summary: “Free space low on {{ $labels.description }} ({{ $labels.instance }})”
description: |
Host: {{ $labels.description }}
IP: {{ $labels.instance }}
Mount: {{ $labels.mountpoint }}
Free Space: {{ printf “%.2f” $values.FreeSpace.Value }}%

but in email subject
i want to display instance name in subject not default value.

image

Hi, rules are a bit different in notification templates. In notification templates, you have a list of alerts passed as value, so you have to do with those. To get summaries, you’ll have to do something like:

{{ range . -}}
  - {{ index .Annotations "summary" }}
  {{ end }}
1 Like