One of the new features in SCOM 2019 and later is HTML based emails.
This is great – because they are much more attractive and configurable over the previous plain text.
SCOM 2016 and earlier alerts:
Has plain text email like this:
This same email in SCOM 2019 and later:
Looks great right???
Almost.
A big complaint here is that the Alert Description now shows up as one big blob of text, in HTML format. The line breaks are not honored and this is very hard to read.
The cool thing about HTML, is that you have a LOT of control over how things are presented visually, and the SCOM HTML supports CSS controls.
A simple change the in the SCOM Notification Channel from this line:
<b>Alert description:</b> $Data[Default='Not Present']/Context/DataItem/AlertDescription$<br />
To this:
<div style="white-space: pre"><b>Alert description:</b> $Data[Default='Not Present']/Context/DataItem/AlertDescription$<br /></div>
and our emails will format exactly as they are seen in the console:
Hi Kevin,
How we edit email message there for html as it is showing in greyed and not editable.
Thanks
You use the copy button, then copy the entire thing to notepad, make your edits – then copy and use the paste button. You cannot directly edit.
Hi Kevin
We made the changes in our environment (SCOM2019) but the mail format is still “ugly” 🙁 do we have to restart some services or other workarounds?
No – you don’t need to. How odd. Are you should you made changes to the SMTP channel that the subscription is using?
Also – is the alert description “ugly” in the console too?
yes, we only have one SMTP channel.
in the scom-console itself, the description-field looks fine. its only the mail-output that is still broken…
ok, it seems that our local SMTP-server has something to do with. if i configured the SMTP directly to Exchange Online then the format is working….
How do you embed an image in the body of the email?
We’d like to show a company logo.
I used an image located on a shared drive, but if the user opens the email off the network, the image won’t show.
How do I configure an email notification to Remedy to a specific Remedy server? Starting from the channel to the subscription, please.
This is what I have for the fields the Remedy team requires:
Schema: Target Staging
Server: Remedy server name
Login: login id
Password: login id
Action: Submit
Format: Short
Submitter !2!: login id
Request Customer – Remedy Login !536870942!: systemcenterclientname
Request Summary !536870914!: Summary of Ticket to be created
Request Notes !536870915!: Detailed description of the ticket being logged
Request Impact !536870918!: 2-Significant/Large
Request Urgency !536870919!: 2-High
Request Type !536870920!: Infrastructure Event
Support Group Company !536870929!: Company name in Remedy
Support Group Organization !536870933!: Company org in Remedy
Support Group Name !536870935!: ASI – Assignment group name
Ops Tier 1 !536870949!: END USER SERVICES
Ops Tier 2 !536870950!: ERROR REPORTING
Ops Tier 3 !536870951!: SW-APPLICATION ERROR
Prod Tier 1 !536870954!: Software
Prod Tier 2 !536870955!: Operating System Software
Prod Tier 3 !536870956!: Operating System
Product Name !536870957!: Microsoft Windows
Request Work Log Notes !536870926!: Client name SCOM – Automated email integration Alert logged
Altron Action !536870927!: INC-CREATE
Create New Request !536870932!: Yes
I am using SCOM 2016 UR10
Hi Kevin,
Thanks for blogging about this. I’ve tried to do this in a SMTP channel, but the output puts everything on one line instead of being nicely structured in the alert description within the console. Not sure what else to try here.
Here is a snippet of the HTML in one of the channels I have it on.
Source: $Data[Default=’Not Present’]/Context/DataItem/ManagedEntityDisplayName$
Path: $Data[Default=’Not Present’]/Context/DataItem/ManagedEntityPath$
Last modified by: $Data[Default=’Not Present’]/Context/DataItem/LastModifiedBy$
Last modified time: $Data[Default=’Not Present’]/Context/DataItem/LastModifiedLocal$
Alert description: $Data[Default=’Not Present’]/Context/DataItem/AlertDescription$
I need to change the color of the email to green when the Alert resolved. can I do this.