How to create a Email Alert with device "service" description in the content?

Hi all,
I’ve already create alert mail when service port is fail , but I want the email content descript which "service port " is down , I don’t know how to set the "service port " syntax in the alert template …

thank you in advance .

I think you are looking for

$value['service_desc']
$value['service_type']
$value['service_message']

Hope that helps

Source: https://docs.librenms.org/Alerting/Templates/#examples-html

Hi TheGreatDoc
thank you for your reply , I add those into my alert template and test , but it shows blank without any message , the template as blow
警告:{{ $alert->title}}
設備 ID:{{ $alert->device_id }}
設備名稱:{{ $alert->hostname}}
設備域名:{{ $alert->sysName}}
作業系統:{{ $alert->version}}
設備位置:{{ $alert->location}}
開機時間:{{ $alert->uptime_long}}
設備描述:{{ $alert->description}}
筆記:{{ $alert->notes}}
ping loss (if icmp enabled):{{ $alert->ping_loss}}
ping min (if icmp enabled):{{ $alert->ping_min}}
ping max (if icmp enabled):{{ $alert->ping_max}}
ping avg (if icmp enabled):{{ $alert->ping_avg}}
DESC:{{$value[‘service_desc’]}}
TYPE:{{$value[‘service_type’]}}
MESSAGE:{{$value[‘service_message’]}}

You need to put them in a foreach.

@foreach ($alert->faults as $key => $value)
DESC:{{ $value[‘service_desc’] }}
TYPE:{{ $value[‘service_type’] }}
MESSAGE:{{ $value[‘service_message’] }}
@endforeach

If you take a look to the link I posted, you will get a fully working service template (for html emails).

HI TheGreatDoc
Thank you very much , because of you ,I succeed setting up my alert template ~~!!!

thanks again !!