How to Implement a Data Source Module
Updated: January 31, 2012
Applies To: System Center 2012 - Operations Manager
A data source module type generates data using some form of instrumentation of some timed trigger action. The following procedure describes how to implement a managed data source module.
To implement a data source module
Create a .NET class library project.
Add references to the following assemblies:
- Microsoft.EnterpriseManagement.Healthservice
- Microsoft.Mom.Common
- Microsoft.Mom.Modules.DataTypes
- Microsoft.EnterpriseManagement.Healthservice
Define a class that derives from ModuleBase, and specify the MonitoringModule attribute [MonitoringModule(ModuleType.DataSource)].
Set the value of the ModuleOutput attribute to true.
Implement methods with the following signatures:
- public override void Shutdown()
- public override void Start()
- public void OnNewDataItems(DataItemBase[] dataitems,Boolean logicallyGrouped, DataItemAcknowledgementCallback acknowledgeCallback,Object acknowledgedState,DataItemProcessingCompleteCallback completionCallback,Object completionState)
- public override void Shutdown()
When all the methods are implemented, add the compiled assembly to the Global Assembly Cache (GAC). This is the only way that Operations Manager will be able to properly load the assembly.
For a full sample, download the System Center 2012 – Operations Manager Managed Module Samples source code.