Pardon the formatting mistake, I double-checked the MP and looks like I forgot an '@', here's the updated format:
$Data/Context/Property[@Name='<Property>']$ Thanks, Geoff From: [email protected] [mailto:[email protected]] On Behalf Of Orlebeck, Geoffrey Sent: Wednesday, September 02, 2015 7:53 AM To: '[email protected]' Subject: [msmom] RE: Using Property bag data in a Monitor-Alert description I'm not sure if this is the same exact scenario, but I had a similar Parameter Replacement issue and Kevin Holman showed me this format to retrieve the data: $Data/Context/Property[Name='<Property Name>']$ So perhaps this would work: $Data/Context/Property[Name='jobfailure_message']$ I don't 100% know that would make the difference, perhaps someone else can chime in to confirm. Here is the reference link Kevin shared: http://blogs.technet.com/b/kevinholman/archive/2014/07/10/monitor-for-file-size-with-scom-using-script-and-wmi-examples.aspx -Geoff From: [email protected]<mailto:[email protected]> [mailto:[email protected]] On Behalf Of Gareth Miles Sent: Wednesday, September 02, 2015 7:45 AM To: [email protected]<mailto:[email protected]> Subject: [msmom] Using Property bag data in a Monitor-Alert description Good Day I have a vbs script which is cooking down SQL Jobs to the SQL instance. I have a timedscript.PropertyBagProvider used in the first data source which collects various aspects of each SQL job into a collection of propertybags. I also have a datagenericmapper in this data source to collect one of the propertybag values from the previouse module into a performance collection for a Rule & Monitor later on. I have a second data source which filters each job, then a rule to collect the value in the datageneric mapper, a MonitorType to with expression filters to evaluate the datagenericmapper value, and then the monitor. All this is working as expected I'm having a problem with the values in the Monitor alert description. I can use the "Target" and "Data" drop downs to get the property values of the target (SQL Job), or the property values from the datagenericmapper output. This sets alert parameters in the alert settings: <AlertParameters> <AlertParameter1>$Target/Property[Type="MicrosoftSQLServerLibrary!Microsoft.SQLServer.AgentJob"]/Name$</AlertParameter1> <AlertParameter2>$Target/Property[Type="MicrosoftSQLServerLibrary!Microsoft.SQLServer.AgentJob"]/OriginatingServer$</AlertParameter2> <AlertParameter3>$Target/Property[Type="MicrosoftSQLServerLibrary!Microsoft.SQLServer.AgentJob"]/Description$</AlertParameter3> <AlertParameter4>$Data/Context/Value$</AlertParameter4> </AlertParameters> And those get used in the alert description: The SQL Job "{0}" has failed on instance "{1}". The jobfailure description is: {2} The state of the job is {3} 0 = Failure 1 = Success 5 = Unknown I want to be able to pull the values from the property bag data in the VBScript used in the timedscript.PropertyBagProvider. I've tried to do this by adding the propertybag data to the alert perameters like so: <AlertParameters> <AlertParameter1>$Target/Property[Type="MicrosoftSQLServerLibrary!Microsoft.SQLServer.AgentJob"]/Name$</AlertParameter1> <AlertParameter2>$Target/Property[Type="MicrosoftSQLServerLibrary!Microsoft.SQLServer.AgentJob"]/OriginatingServer$</AlertParameter2> <AlertParameter3>$Target/Property[Type="MicrosoftSQLServerLibrary!Microsoft.SQLServer.AgentJob"]/Description$</AlertParameter3> <AlertParameter4>$Data/Context/Value$</AlertParameter4> <AlertParameter5>$Data/Property[@Name='jobfailure_message']$</AlertParameter5> </AlertParameters> And adding it to the description like so <Description>The SQL Job "{0}" has failed on instance "{1}". The jobfailure description is: {2} The state of the job is {3} 0 = Failure 1 = Success 5 = Unknown Job Failure message: {4}</Description> But this hasn't worked. Does anyone know how to get this done? I've attached the management pack. Kind regards [ITServiceAssurance_Logo (2)] Gareth Miles System Center Technical Lead Phone: +27 31 580 1582 Mobile: +27 83 648 8559 ________________________________ The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer. Furthermore, the information contained in this message, and any attachments thereto, is for information purposes only and may contain the personal views and opinions of the author, which are not necessarily the views and opinions of the company. ________________________________ 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.
