Variable $Data/Context/DataItem/TimeRaisedL ocal$ Not working
Hello,
I am trying to make edits to a MP that I downloaded, called Alert_Forward_MP_3_0
Looking at the xml file, I can make changes to some of the values, to change the behavior of the MP. This MP creates a button in the SCOM Console, that allows an admin to select an alert, click the button, and an email window from Outlook opens
automatically with some info about the alert already filled into the body of the email.
I am trying to edit the following:
<Parameters>
<Parameter>"$MonitoringObjectName$"</Parameter>
<Parameter>"$Name$"</Parameter>
<Parameter>"$Description$"</Parameter>
<Parameter>"$TimeRaised$"</Parameter>
<Parameter>"$Severity$"</Parameter>
</Parameters>
My issue is that the $TimeRaised$ value comes up in UTC time. I searched online and found there is another variable, $TimeRaisedLocal$
The issue is that when I try to use this variable, save the xml and reimport the mp, when I click the button, I do not get a time value at all, instead
I get text showing me the variable name. I tried changing this variable to another time variable called $TimeAdded$ and when I clicked the button,
a time value was inserted, granted it was in UTC, but it showed me I could replace the variable name with another one.
Is the variable $TimeRaisedLocal$ a valid
variable still? I found it from the following source:
http://blogs.technet.com/b/kevinholman/archive/2010/03/05/adding-event-time-to-an-alert-description.aspx
Here is all of the xml in the mp xml file:
<?xml version="1.0" encoding="utf-8"?><ManagementPack
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" ContentReadable="true"><Manifest><Identity><ID>AlertForward</ID><Version>6.0.5000.1</Version></Identity><Name>AlertForward</Name><References><Reference
Alias="SystemLibrary6050000"><ID>System.Library</ID><Version>6.0.5000.0</Version><PublicKeyToken>31bf3856ad364e35</PublicKeyToken></Reference><Reference Alias="SystemCenter"><ID>Microsoft.SystemCenter.Library</ID><Version>6.0.5000.28</Version><PublicKeyToken>31bf3856ad364e35</PublicKeyToken></Reference></References></Manifest><Presentation><ConsoleTasks><ConsoleTask
ID="ConsoleTaskGeneratedByUI37f3a629f8d248059bd33f4a7fa086d7" Accessibility="Public" Enabled="true" Target="SystemLibrary6050000!System.Entity" RequireOutput="false" Category="Alert">
<Application>C:\Forward_Alerts_MP\email_alert.vbs</Application>
<Parameters>
<Parameter>"$MonitoringObjectName$"</Parameter>
<Parameter>"$Name$"</Parameter>
<Parameter>"$Description$"</Parameter>
<Parameter>"$TimeRaisedLocal$"</Parameter>
<Parameter>"$Severity$"</Parameter>
</Parameters>
<WorkingDirectory /></ConsoleTask></ConsoleTasks><Folders><Folder ID="Folder_71f90a12cff54284b38f9b4e1ac2672e" Accessibility="Public" ParentFolder="SystemCenter!Microsoft.SystemCenter.Monitoring.ViewFolder.Root" /></Folders></Presentation><LanguagePacks><LanguagePack
ID="ENU" IsDefault="false"><DisplayStrings><DisplayString ElementID="AlertForward"><Name>AlertForward</Name><Description>Forward an alert in the Operations Console to a user via email. To configure this functionality, run setup.exe.</Description></DisplayString><DisplayString
ElementID="Folder_71f90a12cff54284b38f9b4e1ac2672e"><Name>AlertForward3</Name></DisplayString><DisplayString ElementID="ConsoleTaskGeneratedByUI37f3a629f8d248059bd33f4a7fa086d7"><Name>Forward Alert via Email</Name></DisplayString></DisplayStrings></LanguagePack></LanguagePacks></ManagementPack>
Any help will be appreciated.
Thanks,
Ralph Kyttle
April 7th, 2011 6:28pm
Hi,
I have check the Management Pack Authoring Guide and there is not a parameter “TimeRaisedLocal”:
Management Pack Authoring Guide
http://download.microsoft.com/download/B/F/D/BFDD0F66-1637-4EA3-8E6E-8D03001E5E66/OM2007R2_MPAuthoringGuide.docx
In addition, please also see:
Alert Notification Subscription Variables, and linking that to the console, database, and SDK
http://blogs.technet.com/b/kevinholman/archive/2009/09/23/alert-notification-subscription-variables-and-linking-that-to-the-console-database-and-sdk.aspx
Thanks.
Nicholas Li - MSFT
Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
Free Windows Admin Tool Kit Click here and download it now
April 11th, 2011 3:20am
Hi Nicholas,
I took a look at the links you provided. While I do not see "TimeRaisedLocal" in the authoring guide, I do see it as a variable within the spreadsheet found on Kevin Holman's blog post.
I also see it mentioned in the following posts:
http://blogs.technet.com/b/cliveeastwood/archive/2007/10/12/a.aspx
http://blogs.technet.com/b/kevinholman/archive/2010/03/05/adding-event-time-to-an-alert-description.aspx
Please let me know what you think, is it possible that this variable was removed from SCOM 2007 R2? If so, do you know of a variable that I can use in its place? The TimeRaised variable is showing up in UTC time, so it is not showing the correct
time value for me when I use it, as I am in Eastern Standard Time (America / New York) Can I convert the value that I get from TimeRaised so it will display properly?
April 11th, 2011 1:35pm