Help create an alert template

Hi, I’m a good user of librenms.

I’m making very good use of the templates that come with the libnms installation,
I’m having trouble creating additional templates.

The alert template I want is that I want to receive a message in the eventlog.


Alert rule:

 name: ipsec tunnels down
 rule: eventlog.type = "State" AND eventlog.message LIKE '%ipsec%' AND 
       eventlog.message LIKE '%changed%'

event log:

Timestamp               Type    Hostname        Message
2024-08-30 10:30:22	State	10.1.19.232	State sensor R-ipsec-test\
R-ipsec-test (1.1.1.1) has changed from Up (2) to Down (1)

The rule itself works fine and the alerts come through fine, but the problem is that I want to have the message content in the alert template, but no matter how much I look, I can’t figure out what values to put in the template.

■ Timestamp: {{ $alert->timestamp }}, elapsed: {{ $alert->elapsed }}
■ Hostname: {{ $alert->sysName }}
■ Messages: #eventlog.message

How do we specify messages to receive messages that correspond to an alert rule?
Any help would be appreciated.

Thank you.