Alert templates placeholder for service name


I have been trying to figure out, how to use a placeholder for the name of a service.

I want to put the service name in the alert title, but I cannot seem to figure out, how to retrieve the name without using a foreach loop.

What I have tried so far that didn’t work:


{{ $value[‘service_name’] }}

It works with a foreach loop:

@foreach ($alert->faults as $key => $value)

{{ $value[‘service_name’] }}


Can anybody guide me in the right direction?

Thanks so much :slight_smile:

check out

Thank you.

I read through that part of the documentation but I couldn’t find anything that states if you want a particular information of faults array you need to use following syntax. The information I am looking for is located in the faults array.

My goal is to put the service name in the alert title. I want to know if it is possible to do that without a foreach loop?

My current alert title is: {{ $alert->sysName }} - @foreach ($alert->faults as $key => $value){{ $value[‘service_name’] }}@endforeach failed

What my goal alert title is: {{ $alert->sysName }} {{ $alert->faults[‘service_name’] }}

I hope I make sense with my question :slight_smile:

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.