次の方法で共有


How to Implement a Write Action Module

Applies To: System Center 2012 - Operations Manager

[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

A write action module type takes a single input data stream and uses it in conjunction with some configuration to affect system state in some way. The following procedure describes how to implement a managed write action module.

To implement a write action module

  1. Create a .NET class library project.

  2. Add references to the following assemblies:

    1. Microsoft.EnterpriseManagement.Healthservice

    2. Microsoft.Mom.Common

    3. Microsoft.Mom.Modules.DataTypes

  3. Define a class that derives from ModuleBase, and specify the MonitoringModule attribute [MonitoringModule(ModuleType.WriteAction)].

  4. If the write action will return data, set the value of the ModuleOutput attribute to true; otherwise, set it to false.

  5. 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)

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

See Also

Concepts

Implementing Managed Modules