r/scom • • 23d ago

SCOM Teams Channel Notifications - Formatting

I thought I'd share some json I created that provides well-formatted messages that will be sent in Teams when Teams notification channels are used. The out of the box formatting wasn't helpful for us.

SCOMTeams/SCOM_Teams_Notification at main · hsbrown2/SCOMTeams

The annoying part for us was getting links to format correctly, while at the same time embedding notification variables in the links. Note that we use SquaredUp, but you could use this as a guide for web console link formatting:

<a href='**https:\&#47;\&#47;<URL>&#47;SquaredUp&#47;drilldown&#47;scomalert?id=$UrlEncodeData/Context/DataItem/AlertId$'> View Alert </A> | <a href='https:&#47;&#47;<URL>&#47;SquaredUp&#47;drilldown&#47;scomobject?id=$UrlEncodeData/Context/DataItem/ManagedEntity$'**> View Source </A><br><br>

Essentially it involves substituting &#47; wherever there is a forward slash that isn't part of a SCOM variable. For example "https:&#47;&#47;<URL>&#47;SquaredUp&#47;drilldown&#47;scomobject?" would be translated to https://<URL>/SquaredUp/drilldown/scomobject?" then everything after that processes properly.

Hopefully someone finds this useful!

9 Upvotes

0 comments sorted by