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

so B value(s) will be {{ index $values "B" }} or {{ $values.B }}.

But this is not a task for notification template. You should use it in the alert annotation, e.g. meaningful description:

Pod: {{ $labels.container }} in namespace: {{ $labels.namespace }} on cluster: {{ $labels.kubernetes_cluster }} has high CPU utilization: {{ humanize $values.B.Value }}%

and notification template just use that annotation.

1 Like