Deadman alert not showing hostname details


I’m using the below tick script to generate deadman alert.

var data = stream

|deadman(0.0, 1m)
.id(’{{ index .Tags “host”}}’)
.message(‘Server {{ .ID }} is OFFLINE’)

The issue am facing here is am not getting host information from the alert. It trigger the alert like below.

“id”: “”,
“message”: “Server is OFFLINE”,

I made ID as " .id(’{{ index .Tags }}’)", and noe it changed like

“id”: “map[]”,
“message”: “Server map[] is OFFLINE”,

I don’t understand what went wrong here. Can anyone please help me to resolve this issue?

Thank you in advance.