Alerting: Change __value__ label to __value_string__ annotation and add ValueString variable in notifications (#36032)

* Alerting: Allow __value__ label in notifications
was being removed by removePrivateItems
discoverd in #36020, but issue is not about that specifically

* __value__ label to __value_string__ annotation
and .ValueString extended property for notifications
This commit is contained in:
Kyle Brandt
2021-06-24 12:45:49 +05:30
committed by GitHub
parent fa46c877a9
commit 19f764739b
4 changed files with 16 additions and 6 deletions
@@ -1455,9 +1455,10 @@ var expNotifications = map[string][]string{
},
"annotations": {},
"startsAt": "%s",
"valueString": "[ var='A' labels={} value=1 ]",
"endsAt": "0001-01-01T00:00:00Z",
"generatorURL": "http://localhost:3000/alerting/UID_WebhookAlert/edit",
"fingerprint": "7611eef9e67f6e50",
"fingerprint": "929467973978d053",
"silenceURL": "http://localhost:3000/alerting/silence/new?alertmanager=grafana&matchers=alertname%%3DWebhookAlert",
"dashboardURL": "",
"panelURL": ""
@@ -1621,10 +1622,11 @@ var expNotifications = map[string][]string{
{
"labels": {
"__alert_rule_uid__": "UID_AlertmanagerAlert",
"__value__": "[ var='A' labels={} value=1 ]",
"alertname": "AlertmanagerAlert"
},
"annotations": {},
"annotations": {
"__value_string__": "[ var='A' labels={} value=1 ]"
},
"startsAt": "%s",
"endsAt": "0001-01-01T00:00:00Z",
"generatorURL": "http://localhost:3000/alerting/UID_AlertmanagerAlert/edit",