hi there,
how to show hostname in alert telegram?
i have tried to set summary
“{{ $labels.instance }} of job {{ $labels.job }} has been down”
and
“{{ $labels.hostname }} of job {{ $labels.job }} has been down”
for {{ $labels.instance }} it showing IP address but {{ $labels.hostname }} not showing hostname
Looking at the last screenshot, it doesn’t look like the alert has a hostname
label?
when i try
{{ $labels.hostname }} it not showing hostname, just returns no value
i want to display hostname in summary alert
how do i show hostname in alert telegram?
To use {{ $labels.hostname }}
your datasource needs to return a label called hostname
. However, looking at the screenshots it only returns a label called instance
, not hostname
.