I need some help setting up email alerts

I have set up the email alerting and it works fine. I would like tho to have as Fault or Description of the problem the same text that I see in the Alerts in the web page. Those are really well structured and one can pretty much instantly figure out what’s going on.
I will give you an example :
Current Value: 2 (runtime)
low: 5, low_warn: 10, high_warn: 2000, high: 3000

This is what an alert looks in the web’s alert tab
If I am using the default template for the same alert this is what the alert looks like in my email :

sysObjectID = .; sysDescr = APC Web/SNMP
Management Card (MB:v4.1.0 PF:v6.4.0 PN:apc_hw05_aos_640.bin AF1:v6.4.0
AN1:apc_hw05_sumx_640.bin MN:AP9631 HR:08 SN: ZA1616004594 MD:04/29/2016)
(Embedded PowerNet SNMP Agent SW v2.2 compatible); location_id = 13;
sensor_id = 628; sensor_oid = .; sensor_descr =

I am using the default template with the code :

@foreach ($alert->faults as $key => $value)
{{ $key }}: {{ $value[‘string’] }}

I’ve tried to figure out how to achieve the desired result reading the documentation but i couldn’t figure it out. So if anybody has a clue, please do share :slight_smile:

You need to make a new alert template and assign it to that alert rule.
Modify the template code inside the foreach to display the details and text you want. This is covered in the docs.

1 Like