Accessing Query Expression Results for Custom Notification Templates in Managed Grafana Alerts

The best practice to use value (i.e. from section “B”) in notification template is:

  1. Edit your alert rule. Add this string to “Description” section in “Add annotations” part:
    {{ $values.B }}
  2. Then go to the Alerting->Contact Points->Notification Templates and add this string to your template:
    Value is: {{ .CommonAnnotations.description }}

After firing the alert you should see your value inside the alert report.
Good luck!