Send host name with Alert

Hello, I wanted to send the hostname of an alerted host with the e-mail, and I stumbled up on to use something like this in the alert description:
Host: {{ $ }}

But if an alert triggers, it will just write the literal “{{ $ }}” instead of the hostname. Trying just $ gave me a “<no value”

I heard there are alert templates, but I just want to add one variable and not re-write the whole alert e-mail.

Hi @madddogg2406,
If you are using Reduce expression in your alert try this:

{{ $ }}

If you are using Classic condition expression try this:

{{ $ }}

Best regards,

Ah okay I will try this. Is a Threshold also a B0 or a B?

Hi! If it helps the documentation for this can be found here Templating labels and annotations | Grafana documentation, including for Classic Conditions.

To answer the question it is just Classic Conditions that use B0 , B1, etc. Reduce, Threshold and Math expressions do not. This is because each individual Classic Condition can contain multiple conditions.