Make Email Alerts Subject Show sysName Instead of IP

Is there a way to get my subject of my alert notification emails to include the sysName instead of IP? I was able to get the sysName in the body of the email but is there a way to get the sysName in the email subject?

Instead of “Alert for device - Device Down! Due to no ICMP response.”
We are hoping to have “Alert for device NY01-06-FLRSW-09 - Device Down! Due to no ICMP response.”

Is this possible and if so, how to do it?

You can always pass the {sysName} variable in the email template

Thank you for responding. I was able to pass sysname in the email body but not in the email subject. Any thoughts on how I can pass sysName in the email subject?

I have a template where I pass the sysName in the “Alert Title” section for it to show up on the email subject.

WARNING : Disk Usage full for {{ strtoupper($alert->sysName) }}


I’m still struggling to get the sysName to appear in the subject field of my email alerts. Can you please give more detail on how you got yours to work? I have been trying to get what you posted to work for me but it’s not working out. Below is what I have for my Default Alert Template. Can you please help me understand where I need to make adjustments to my UI template?

System Name: {{ $alert->sysName }} {{ $alert->title }}
Hostname: {{ $alert->hostname }}
System Name: {{ $alert->sysName }}
IP Address: {{ $alert->ip }}
Device ID: {{ $alert->device_id }}
Device Name: {{ $alert->sysName }}
Severity: {{ $alert->severity }}
@if ($alert->state == 0) Time elapsed: {{ $alert->elapsed }} @endif
Timestamp: {{ $alert->timestamp }}
Unique-ID: {{ $alert->uid }}
Rule: @if ($alert->name) {{ $alert->name }} @else {{ $alert->rule }} @endif
@if ($alert->faults) Faults:
@foreach ($alert->faults as $key => $value)
#{{ $key }}: {{ $value[‘string’] }}
Alert sent to:
@foreach ($alert->contacts as $key => $value)
{{ $value }} <{{ $key }}>

I think you want to change the Alert title and Recovery title fields, not the Template field to change the subject. When you edit the template, look for the text fields at the bottom of the page.

Yeah. I think it is working now. Thank you and arnabdutta1 so much!!

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