Thanks Hendrik

This is in line with what you were saying with regards to the expression.filter 
in my previous query.
I was hoping this wasn't the case.

I'll give your suggestion a go.

Cheers
Gareth

From: [email protected] [mailto:[email protected]] On 
Behalf Of Henrik Andersen
Sent: 02 September 2015 05:35 PM
To: [email protected]
Subject: [msmom] SV: Using Property bag data in a Monitor-Alert description

Hi!,

You can't the way you have implemented your monitor type.   Your monitor type 
is based on datasource which outputs performance data.  If your datasource has 
Property bags as output, you can use any property bag value in your monitor.

If it's because you also want the jobs status written to the datawarehouse, why 
not have a rule, with the property bag datasource as input,   and the 
appropriate performance data mapper and write action?

/Henrik
Fra: [email protected]<mailto:[email protected]> 
[mailto:[email protected]] På vegne af Gareth Miles
Sendt: 2. september 2015 16:45
Til: [email protected]<mailto:[email protected]>
Emne: [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.

________________________________




#############################################################################################
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.
#############################################################################################



Reply via email to