So now we are to the point where we can make a monitor type for our shiny new data source. We can then use this in an actual monitor and start monitoring for this condition on servers!
Step 1: Create New Composite Monitor Type
Add in Member Modules. What we want here is the DataSource we created in Step II and then two condition detections, one for our NoLeakingProcesses state and one for our LeakingProcesses state.
We want to setup our configuration of the ProcessHandleLeak DataSource to push off setting the specific values for our variables until we actually implement the monitor against a class. So, to do this, we will again use configuration variables. This time we will use the ‘promote’ option in the Authoring Console which will automatically create the variables in the configuration schema pane (we will still have to define the value type – int, string, etc – though).
Now we add in our condition detections.
The next thing we have to do it determine the “Regular Composition”. This simply means for the State NoLeakingProcesses what does the flow through the monitor look like and what does it look like for the State LeakingProcesses?
The next step is to update the Configuration Schema. Note this time we do not have to create the variables (because we used promote) but we still have to set their types.
The Final Step in creating the Composite Monitor is setting up the overrides.
You now have now created your own composite monitor powered by a custom, PowerShell driven DataSource! Stay Tuned for how to use this new Composite Monitor to actually monitor for Processes that are Leaking Handles as well as the .XML Management Pack!