I’m struggling to decant the variable appearing as .Annotations.__dashboardUid__
in the “payload” window of the notifications template groups window in grafana cloud and use it in my template.
My goal is to rewrite dashboard urls programmatically in the template to link individual alerts back to the dashboard from a slack ping. I had this working previously but never with a variable that starts __
so maybe this is not possible? Seems an awful shame to have that information in the payload and not be able to leverage it.
To be explicit I’m looking to access the value targetUid
from a (mostly redacted) payload that looks like the example below.
{
"status": "firing",
"annotations": {
"__dashboardUid__": "targetUid",
"__orgId__": "1",
"__panelId__": "60",
"__value_string__": "foobar",
"__values__": "{\"B\":1,\"C\":1}",
"summary": "foo :: bar"
},
"labels": {
"Environment": "production",
I’ve had success accessing the summary
variable in the annotations
object using {{ .Annotations.summary }}
but no luck with getting at that dashboardUid variable and no luck finding explainations of it’s special nature in the grafana docs.
Can anyone shed light on this or perhaps propose a work around?