How to insert the label-value of an alert's label into the alert's summary?

I have an alert instance with the following values:

[ var='B0' metric='Value' labels={device=/dev/mapper/sysvg-dbbackup, fstype=ext4, group=servers, hostname=vmwebext02, human_name=vmwebext02, job=servers, location=ITS, mountpoint=/home/dbbackup, os=linux} value=0.935096177610537 ], ... (more alert instances follow here)

I would like to put the label hostname in the alert’s summary such as e.g.:

DB backup disk usage >80% on host:  {{ labels.hostname }}

However, I am unable to find the correct syntax for this.

Using
DB backup disk usage >80% on host: {{ labels.hostname }}
it prints:
"DB backup disk usage >80% on host: {{ labels.hostname }}"

Using
DB backup disk usage >80% on host: {{ $labels.hostname }}
it prints:
"DB backup disk usage >80% on host: \<no value\>"

What is the correct syntax to achieve this?

Hi,

It should be the second one - did your alert fire naturally (the query returned more than 80%) or was it because the query returned “no data” - if the latter, the values of labels are unpopulated, hence “no value”

i want insert the value of host from zabbix into the alert’s summary of an alert’s label? the value is not in alert’s label.
can i make it?

where will you get the zabbix host from? I’m not an expert on zabbix datasource, so you might get more luck creating a separate topic from that.