Standard Module Composition for monitors


Hi all, this is our standard architecture for MP development, without any clear direction in official documentation, we built this standard to have a common schema to achieve:

  • code reusability, we want to have custom code just in one place so we need to support it just once
  • on demand detections for monitors

With this schema we have covered every single development scenario we got into with the notable exception of on demand detections for performance based monitors. This is due to the fact that standard libraries are missing a probe type for performance collection.

So, for any given data source we build:

  • A probe type with input data, this is were custom code, if any, resides
  • A trigger probe type without any input data based on the previous probe type
  • A data source type based on the probe type and typically a scheduler
  • A monitor type that uses the data source type and the trigger probe
  • A unit monitor that uses the monitor type
  • If needed a task that uses the trigger probe type

The sequence will become like this:

image

And the following is a snippet with the most important parts:

…<TypeDefininitions>

<ModuleTypes>

<DataSourceModuleType ID="DSType" Accessibility="Internal" Batching="false">

<ModuleImplementation Isolation="Any">
         <Composite>
           <MemberModules>

<DataSource ID="Sched" TypeID="System!System.Scheduler"> …

<ProbeAction ID="Probe" TypeID="ProbeType"> …

<Composition>
  <Node ID="Probe">
    <Node ID="Sched" />
  </Node>
</Composition> …

  <OutputType>System!System.BaseData</OutputType> <!—here the appropriate data type must be specified –>
</DataSourceModuleType>

<ProbeActionModuleType ID="ProbeType" Accessibility="Internal" Batching="false" PassThrough="false"> …

<ModuleImplementation Isolation="Any">
  <Composite>
    <MemberModules>
      <ProbeAction ID="OLEDB" TypeID="System!System.OleDbProbe"> <!—here a valid probe action type id must be used—> …

      <Composition>
        <Node ID="OLEDB" />
      </Composition>
    </Composite>
  </ModuleImplementation>
  <OutputType>System!System.OleDbData</OutputType>
  <InputType>System!System.BaseData</InputType>
</ProbeActionModuleType>

<ProbeActionModuleType ID="TriggerProbeType" Accessibility="Internal" Batching="false" PassThrough="false"> …

<ModuleImplementation Isolation="Any">
   <Composite>
     <MemberModules>
       <ProbeAction ID="Probe" TypeID="ProbeType"> …

<ProbeAction ID="PassThrough" TypeID="System!System.PassThroughProbe" />

     <Composition>
        <Node ID="Probe">
          <Node ID="PassThrough" />
        </Node>
      </Composition>
    </Composite>
  </ModuleImplementation>
  <OutputType>System!System.OleDbData</OutputType> <!—here the appropriate data type must be specified –>
  <TriggerOnly>true</TriggerOnly>
</ProbeActionModuleType>

</ModuleTypes>

<MonitorTypes>

<UnitMonitorType ID="MonitorType" Accessibility="Internal"> …

<MonitorImplementation>
   <MemberModules>
   <DataSource ID="DS" TypeID="DSType">…

   <ProbeAction ID="Probe" TypeID="TriggerProbeType"> …

<ConditionDetection ID="CD1" TypeID="…"> …

<ConditionDetection ID="CD2" TypeID="…"> …

<RegularDetections>
    <RegularDetection MonitorTypeStateID="StateID">
      <Node ID="CD1">
          <Node ID="DS" />
        </Node>
      </Node>
    </RegularDetection>…

          <OnDemandDetections>
            <OnDemandDetection MonitorTypeStateID="StateID">
              <Node ID="CD1">
                  <Node ID="Probe" />
                </Node>
              </Node>
            </OnDemandDetection>…

</UnitMonitorType>

 

Once all the appropriate types are defined the UnitMonitor and the Task (if needed) are straightforward.

– Daniele

This posting is provided "AS IS" with no warranties, and confers no rights.

Advertisements
  1. SQL database backup monitor a different approach « Quae Nocent Docent

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: