If you want hostname in email subject line - just add:

$Data/Context/DataItem/ManagedEntityDisplayName$
or
$Data/Context/DataItem/ManagedEntityPath$

To the notification email format?



From: [email protected] [mailto:[email protected]] On 
Behalf Of Orlebeck, Geoffrey
Sent: Friday, February 20, 2015 6:06 PM
To: [email protected]
Subject: [msmom] RE: Adding Variable to Notification Subject Line:

When we receive an email alert from our 2007 SCOM infrastructure it comes in as:

"Operations Manager Critical Error Alert on DOMAIN\SERVER" but I cannot find a 
way to mimic that in 2012, even though I have the same setup as 2007.

***Edit***
Just revisited the SCOM 2007 email alert and now I feel like a fool. I thought 
this alert was coming from SCOM 2007 but is actually our MOM 2005 environment 
generating it. At least it's Friday...

And per your article, that is exactly what I have found in my trial and error: 
any attempt at placing a variable in the alert name just results in the 
variable text being passed in the email. The other admins will just have to 
learn how to deal with not seeing the hostname in the subject line. :)

Have a good weekend.
Thanks,
Geoff

From: [email protected]<mailto:[email protected]> 
[mailto:[email protected]] On Behalf Of Kevin Holman
Sent: Friday, February 20, 2015 3:57 PM
To: [email protected]<mailto:[email protected]>
Subject: [msmom] RE: Adding Variable to Notification Subject Line:

For your original question - see:  
http://blogs.technet.com/b/kevinholman/archive/2015/02/20/can-alert-names-contain-dynamic-data.aspx



From: [email protected]<mailto:[email protected]> 
[mailto:[email protected]] On Behalf Of Orlebeck, Geoffrey
Sent: Friday, February 20, 2015 1:04 PM
To: [email protected]<mailto:[email protected]>
Subject: [msmom] Adding Variable to Notification Subject Line:

Searched around quite a bit and don't see a definitive answer:

It appears you can insert variables and custom fields into an alert 
description, but is there any way of inserting a variable into the Alert name 
(which becomes the subject line of the email)? End goal is to input the 
hostname into the subject line for a couple alerts. It doesn't seem possible 
from what I am reading. I even came across a PowerShell script for kicking off 
a customized email alert, but it doesn't appear to address the subject line. Is 
it just not possible?

Full Disclosure in case there is a better way:
We want to alert on Event ID 6008 because our VM servers will complete an 
unplanned reboot before the heartbeat/health service check fails and alerts. I 
have done some testing on a single test VM server and if the Heartbeat is set 
to 15 seconds or less, it will trip the alert. However, not sure of all the 
processing/network overhead that would cause. So as a workaround, if we can 
just get an alert on Event ID 6008, that's sufficient, but in our 2007 
environment the hostname is inserted in the subject line. Tried mirroring that 
without success, so turning here.

Any ideas/thoughts are appreciated. Thank you.

Confidentiality Notice: This is a transmission from Community Hospital of the 
Monterey Peninsula. This message and any attached documents may be confidential 
and contain information protected by state and federal medical privacy 
statutes. They are intended only for the use of the addressee. If you are not 
the intended recipient, any disclosure, copying, or distribution of this 
information is strictly prohibited. If you received this transmission in error, 
please accept our apologies and notify the sender. Thank you.


Confidentiality Notice: This is a transmission from Community Hospital of the 
Monterey Peninsula. This message and any attached documents may be confidential 
and contain information protected by state and federal medical privacy 
statutes. They are intended only for the use of the addressee. If you are not 
the intended recipient, any disclosure, copying, or distribution of this 
information is strictly prohibited. If you received this transmission in error, 
please accept our apologies and notify the sender. Thank you.




Reply via email to