locked
Alerting and write action on a data source RRS feed

  • Question

  • I'm attempting to do the following;
    1. Execute a stored procedure which returns a single row and column of data.
    2. Write the returned data to the SCOM data warehouse.
    3. If the returned data exceeds a threshold, raise an alert.

    I can accomplish this by having a data source that executes the SP and a monitor on that data source which generate an alert if a threshold is exceeded and a rule on the same data source which writes the return value of the SP to the SCOM data warehouse. However this approach causes the SP to be executed twice as the monitor and rule execute the data source. I would prefer to execute the SP once. Can this be achieved and if so what is the design I need to follow?

    Tuesday, June 23, 2009 6:45 AM

Answers


  • If the  XML blob, including overrides, is the same for both workflows then cookdown should happen.  This means both your 2 workflows need to have the same overrides passed into the datasource module.  Things like frequency, and any other values need to be the same.
    Yes, cookdown will work for a monitor or a rule, Operations Manager compares at the DataSource Module level to decide if cook down should happen.

    When you write your two workflows, which use two DataSource Modules like below.  So long as the values passed into the overides of the "Get.My.SQL.Row" are exactly the same between the Rule and the Monitor then the "Get.My.SQL.Row" workflow will only run once.

    DataSourceModuleType = Get.My.SQL.Row
     <Whatever you need to do to get your data>
    DataSourceModuleType = Detect.SQL.DataThreshold
      DataSource Module = Get.My.SQL.Row
      ConditionDetection = <Compare the Threshold and the SQL Value>
     
    Rule ID= Collect.SQL.Data.To.Warehouse
      DataSourceModule = Get.My.SQL.Row
      WriteAction = WriteToDW

    Monitor ID = Check.SQL.Data.Below.Threshold
      DataSourceModule = Detect.SQL.DataThreshold
      WriteAction = GenerateAlert
    • Marked as answer by Chamitha Friday, June 26, 2009 5:43 AM
    Thursday, June 25, 2009 5:58 PM

All replies

  • Have your data source that executes the SQL query be a DataSourceModuleType .  Then create two rules made up of multiple workflows, both rules would first call your new SP DatasourceModuleType (checkout cookdown at http://www.authormps.com/dnn/Concepts/WorkflowBasics/CookDown/tabid/117/Default.aspx)  then pass the resulting data into a second module that does your actions of checking the threshold and writing to the Datawarehouse. 
    • Proposed as answer by S. Halsey Wednesday, June 24, 2009 11:01 PM
    Wednesday, June 24, 2009 11:01 PM
  • Reading the concept of cookdown I should be able to achieve this by having a single data source (which returns the data I want) and 2 rules, one which writes the return value to the data warehouse and another which compares it to a threshold and generates an alert. Cookdown should automatically kick in in this scenario and cause the data source to be executed once. Correct?
    However my data source is scheduled to execute every x min. With cookdown does this mean that the data source will only be executed once even though each rule specifies its own frequency?
    Also wouldn't cookdown work on a similar scenario where the data source is executed by a rule and a monitor? The doco mentions cookdown occurs for workflows not rules specifically. I believe a monitor is a workflow as well.
    Thursday, June 25, 2009 4:05 AM

  • If the  XML blob, including overrides, is the same for both workflows then cookdown should happen.  This means both your 2 workflows need to have the same overrides passed into the datasource module.  Things like frequency, and any other values need to be the same.
    Yes, cookdown will work for a monitor or a rule, Operations Manager compares at the DataSource Module level to decide if cook down should happen.

    When you write your two workflows, which use two DataSource Modules like below.  So long as the values passed into the overides of the "Get.My.SQL.Row" are exactly the same between the Rule and the Monitor then the "Get.My.SQL.Row" workflow will only run once.

    DataSourceModuleType = Get.My.SQL.Row
     <Whatever you need to do to get your data>
    DataSourceModuleType = Detect.SQL.DataThreshold
      DataSource Module = Get.My.SQL.Row
      ConditionDetection = <Compare the Threshold and the SQL Value>
     
    Rule ID= Collect.SQL.Data.To.Warehouse
      DataSourceModule = Get.My.SQL.Row
      WriteAction = WriteToDW

    Monitor ID = Check.SQL.Data.Below.Threshold
      DataSourceModule = Detect.SQL.DataThreshold
      WriteAction = GenerateAlert
    • Marked as answer by Chamitha Friday, June 26, 2009 5:43 AM
    Thursday, June 25, 2009 5:58 PM