Grafana Annotation - Prometheus

Hi,

I have a prometheus annotation that it is working fine. However, I have the following question:

Can an annotation be fed by a template variable?

For instance:
ALERTS{alertname=“Service_Down”, alertstate=“firing”,instance="$host"}

Where $host is from a template:
label_values(jvm_memory_bytes_used{role=“prod”}, instance)

Thanks,
Lp

Yes, it does. Your syntax looks correct too. Are you getting any errors?

Ciao Danielle,

It works.

Thanks.
Lp