HTML host down/up template

I am having a problem wrapping my head around creating some HTML e-mail templates. Can anyone share a host up/down template or Default alert template? Also, how to install? The documentation seems to give just generalizations.

Thanks in advance

Try this. Simple one, but working, clear and effective.

<div style="font-family:Helvetica;">
<h2><b>{{ $alert->title }}<br><br></b></h2>
<b>Device:</b> {{ $alert->hostname }}<br>
<b>Level:</b> {{ $alert->severity }}<br>
@if ($alert->state == 0) <b>Time elapsed:</b> {{ $alert->elapsed }} @endif<br>
<b>Timestamp:</b> {{ $alert->timestamp }}<br>
<b>Rule:</b> @if ($alert->name) {{ $alert->name }} @else {{ $alert->rule }} @endif<br>
@foreach ($alert->faults as $key => $value)<br>
<b>Interface:</b> {{ $value['ifDescr'] }}<br>
<b>Interface description:</b> {{ $value['ifAlias'] }} || <b>Wynegocjowany:</b> 
{{($value['ifSpeed']/1000000000) }} Gbs<br>
<b>Traffic IN:</b> {{ (($value['ifInOctets_rate']*8)/$value['ifSpeed'])*100 }} || <b>Traffic OUT:</b>{{ (($value['ifOutOctets_rate']*8)/$value['ifSpeed'])*100 }}<br>
<a href="https://LIBRENMS_URL/device/device={{ $value['device_id'] }}/tab=port/port={{$value['port_id'] }}/">https://LIBRENMS_URL/device/device={{ $value['device_id'] }}/tab=port/port={{ $value['port_id'] }}/</a><br>

Now you need just to ‘attach’ selected alert to a template “Attach template to rules:”.

1 Like