I want to get the server hostname in my email alerts

Hey guys!

Relatively new to grafana and I am configuring dashboards and alerts from Grafana for my company.

I am trying to get the hostname of the server in Alert summary, but I am not able to find anything for it. Could you please help me out in finding them.

For example I want;

Server (hostname) is down. OR
The CPU Utilisation in (hostname) is above threshold.

Thanks in advance!

Welcome @devoperatr

Have you read through these?

If you are using Slack or Telegram, this will help.

As grant2 says you’ll need to have a read through the docs
We have it set up like the below because the hostname appears for us in the group labels so we call it using that.
In our template file we have it like the below:

{% set groupLabels = payload.get(“groupLabels”, {}) -%}
{{ groupLabels.host }}

This shows the hostname and then we have some other information displayed around this.

Thanks @grant2.
At the moment I am just checking out the alerts through mail. But soon planning to integrate these alerts with JIRA to trigger an automatic ticket.
Is there any article that would prove useful for me in such case!