Has anyone tried to modify the SCOM notification format html? currently the logic for the header colour is blue=information, yellow=warning, red=critical. however I want to add logic to it to include the resolution state, new=use the severity, closed= green..
anyone knows how to do that? below is the default format style.
I'm thinking to add .header-Closed{background-color: green;color: white;}, but how to add the logic to use this header when resolution state is closed.
<!DOCTYPE html>
<html>
<head>
<style>
.header-0{background-color: #527DD2;color: white;}.header-1{background-color: yellow;color: black;}.header-2{background-color: red;color: white;}
span{display: none;}.severity-$Data[Default='Not Present']/Context/DataItem/Severity${display: inline;text-decoration:none;}.monitor-$Data[Default='Not Present']
/Context/DataItem/CreatedByMonitor${display: inline;text-decoration:none;}.cell{float: left;overflow: hidden;text-overflow: ellipsis;white-space: nowrap; max-width: 100%;}
</style>
</head>
<body>
<div style="display: none;">$Data[Default='Not Present']/Context/DataItem/AlertName$: $Data[Default='Not Present']/Context/DataItem/AlertDescription$</div>
<table class="header-$Data[Default='Not Present']/Context/DataItem/Severity$" style="table-layout: auto; width: 100%; padding-left: 10px; padding-right:10px;"><tr>
<td class="cell" align="left" style="width: 25%;"><b><i>
<span class='severity-2'>Critical</span>
<span class='severity-1'>Warning</span>
<span class='severity-0'>Information</span> /
<span class='monitor-true'>Monitor</span>
<span class='monitor-false'>Rule</span></b></i></td>
<td class="cell" align="left" style="width: 70%;">Alert Name: <b><i>$Data[Default='Not Present']/Context/DataItem/AlertName$</b></i></td></tr><tr>
<td class="cell" align="left" style="width: 25%;">Resolution State: <b><i>$Data[Default='Not Present']/Context/DataItem/ResolutionStateName$</b></i></td>
<td class="cell" align="left" style="width: 70%;">Owner: <b><i>$Data[Default='Not Present']/Context/DataItem/AlertOwner$</b></i></td></tr></table>
<div style="margin-top: 20px">
<b>Source:</b> $Data[Default='Not Present']/Context/DataItem/ManagedEntityDisplayName$<br />
<b>Path:</b> $Data[Default='Not Present']/Context/DataItem/ManagedEntityPath$<br />
<b>Last modified by:</b> $Data[Default='Not Present']/Context/DataItem/LastModifiedBy$<br />
<b>Last modified time:</b> $Data[Default='Not Present']/Context/DataItem/LastModifiedLocal$<br />
<b>Alert description:</b> $Data[Default='Not Present']/Context/DataItem/AlertDescription$<br />
<br />
<b>Notification subscription ID generating this message:</b> $MPElement$</div>
<table style="width:100%; margin-top: 20px"><tr><td align="right">
<a href='$Target/Property[Type="Notification!Microsoft.SystemCenter.AlertNotificationSubscriptionServer"]/WebConsoleUrl$/#/monitoring/drilldown/alert/$UrlEncodeData/Context/DataItem/AlertId$'>View Alert</a> </td>
<td align="center"> <a href='$Target/Property[Type="Notification!Microsoft.SystemCenter.AlertNotificationSubscriptionServer"]/WebConsoleUrl$/#/monitoring/drilldown/object/$UrlEncodeData/Context/DataItem/ManagedEntity$'>View Alert
Source</a> </td>
<td align="left"><span class='monitor-true'><a href='$Target/Property[Type="Notification!Microsoft.SystemCenter.AlertNotificationSubscriptionServer"]
/WebConsoleUrl$/#/monitoring/drilldown/monitor/$UrlEncodeData/Context/DataItem/WorkflowId$'>View Monitor</a></span><span class='monitor-false'>
<a href='$Target/Property[Type="Notification!Microsoft.SystemCenter.AlertNotificationSubscriptionServer"]
/WebConsoleUrl$/#/monitoring/drilldown/rule/$UrlEncodeData/Context/DataItem/WorkflowId$'>View Rule</a></span></td></tr></table>
</body>
</html>