UnitMonitorType

Applies To: System Center 2012 - Operations Manager, System Center 2012 R2 Operations Manager, System Center 2012 SP1 - Operations Manager

Represents a monitor type definition used as template for creating unit monitors.

Schema Hierarchy

ManagementPack
  TypeDefinitions
    MonitorTypes
      UnitMonitorType

Syntax

<UnitMonitorType ID=”Company.Product.MonitorTypeID” Comment=”Comment” Accessibility=”Public/Internal” RunAs=”RunAsProfileID”>
   <MonitorTypeStates>…</MonitorTypeStates>
   <Configuration>…</Configuration>   <OverrideableParameters>…</OverrideableParameters>
   <MonitorImplementation>…</MonitorImplementation>
</UnitMonitorType>

Attributes and Elements

The following sections describe attributes, child elements, and the parent element of the UnitMonitorType element.

Attributes

Attribute Description

ID

Required attribute. Represents the identity of the element. To learn how to identify your element in a management pack, see Element Identity and Namespace Conventions.

Comment

Optional attribute. Represents commentary by the management pack author.

Accessibility

Required attribute. Defines the visibility of the monitor type.

RunAs

Optional attribute. Refers to a SecureReference type ID. All instances of this monitor type will run under the credentials set for the SecureReference type ID.

Accessibility Attribute

Value Description

Public

Indicates that the UnitMonitorType element is visible to external management packs.

Internal

Indicates that the UnitMonitorType element is not visible to external management packs.

Child Elements

Element Description

MonitorTypeStates

Contains the definitions for possible operational states of the unit monitor type.

Configuration (UnitMonitorType)

Required element. Represents the parameters of the unit monitor type as the XSD schema.

OverridableParameters

Optional element. Contains any overridable configuration parameters of the unit monitor type.

MonitorImplementation

Required element. Contains the modules and workflow definitions of the unit monitor type.

Parent Elements

Element Description

MonitorTypes

Contains state monitor type definitions in a management pack.

Remarks

A unit monitor type element specifies how to detect operational states through defined workflows. The operational states in a unit monitor type element are defined in its MonitorTypeStates element.

There are two ways a unit monitor type attains a specific state. The most common way is where each monitor state is automatically attained through the defined workflows. The second way is to specify that a state must be attained manually. A manual state is specified by setting a MonitorTypeState element’s NoDetection attribute to false.

A purely non-manual monitor type requires each operational state to have a corresponding workflow. Each workflow runs so that it can return either true or false in relation to the presence of its associated state. This means that each defined workflow is always running, and because the unit monitor can achieve only one state at a time, only one workflow should return true at any time. It is up to the implementation of the unit monitor type to ensure that this is the case.

A manual monitor type defines a single workflow that outputs operational state data.

The operational state-based workflows of a UnitMonitorType are defined in the RegularDetections element. It is also possible to define workflows that can be run on demand from the user interface and not in the context of a specific operational state. On-demand workflows are defined in the OnDemandDetections element.

Operational states do not automatically map to actual health states (for example, Error, Warning, or Healthy). It is up to the unit monitor implementation to map operational states to health states. Monitor implementations are found in the Monitors element of the internal or external management pack.

Example

The following sample illustrates the Microsoft.Windows.2SingleEventLog2StateMonitorType unit monitor type that is defined in the Microsoft.Windows.Library management pack. This particular unit monitor type defines two generic operational states: FirstEventRaised and SecondEventRaised. You would implement this monitor type if the health state of the monitored entity is dependent on raised events in the event log. To view an implementation of the Microsoft.Windows.2SingleEventLog2StateMonitorType unit monitor type, see UnitMonitor.

<UnitMonitorType
ID="Microsoft.Windows.2SingleEventLog2StateMonitorType"
Accessibility="Public">
  <MonitorTypeStates>
    <MonitorTypeState ID="FirstEventRaised" />
    <MonitorTypeState ID="SecondEventRaised" />
  </MonitorTypeStates>
  <Configuration>
    <IncludeSchemaTypes>
      <SchemaType>System!System.ExpressionEvaluatorSchema</SchemaType>
    </IncludeSchemaTypes>
    <xsd:element name="FirstComputerName" type="xsd:string" />
    <xsd:element name="FirstLogName" type="xsd:string" />
    <xsd:element name="FirstExpression" type="ExpressionType" />
    <xsd:element name="SecondComputerName" type="xsd:string" />
    <xsd:element name="SecondLogName" type="xsd:string" />
    <xsd:element name="SecondExpression" type="ExpressionType" />
  </Configuration>
  <MonitorImplementation>
    <MemberModules>
      <DataSource TypeID="Microsoft.Windows.EventProvider"
      ID="FirstDataSource">
        <ComputerName>$Config/FirstComputerName$</ComputerName>
        <LogName>$Config/FirstLogName$</LogName>
      </DataSource>
      <DataSource TypeID="Microsoft.Windows.EventProvider"
      ID="SecondDataSource">
        <ComputerName>$Config/SecondComputerName$</ComputerName>
        <LogName>$Config/SecondLogName$</LogName>
      </DataSource>
      <ConditionDetection TypeID="System!System.ExpressionFilter"
      ID="FirstFilterCondition">
        <Expression>$Config/FirstExpression$</Expression>
      </ConditionDetection>
      <ConditionDetection TypeID="System!System.ExpressionFilter" ID="SecondFilterCondition">
        <Expression>$Config/SecondExpression$</Expression>
      </ConditionDetection>
    </MemberModules>
    <RegularDetections>
      <RegularDetection MonitorTypeStateID="FirstEventRaised">
        <Node ID="FirstFilterCondition">
          <Node ID="FirstDataSource" />
        </Node>
      </RegularDetection>
      <RegularDetection MonitorTypeStateID="SecondEventRaised">
        <Node ID="SecondFilterCondition">
          <Node ID="SecondDataSource" />
        </Node>
      </RegularDetection>
    </RegularDetections>
  </MonitorImplementation>
</UnitMonitorType>

The following sample illustrates the manual Microsoft.Windows.SingleEventLogManualReset2StateMonitorType unit monitor type that is defined in the Microsoft.Windows.Library management pack. This particular unit monitor type defines two generic operational states: FirstEventRaised and SecondEventRaised. You would implement this monitor type if the health state of the monitored entity is dependent on raised events in the event log. To view an implementation of the Microsoft.Windows.2SingleEventLog2StateMonitorType unit monitor type, see UnitMonitor.

<UnitMonitorType
ID="Microsoft.Windows.2SingleEventLog2StateMonitorType"
Accessibility="Public">
  <MonitorTypeStates>
    <MonitorTypeState ID="FirstEventRaised" />
    <MonitorTypeState ID="SecondEventRaised" />
  </MonitorTypeStates>
  <Configuration>
    <IncludeSchemaTypes>
      <SchemaType>System!System.ExpressionEvaluatorSchema</SchemaType>
    </IncludeSchemaTypes>
    <xsd:element name="FirstComputerName" type="xsd:string" />
    <xsd:element name="FirstLogName" type="xsd:string" />
    <xsd:element name="FirstExpression" type="ExpressionType" />
    <xsd:element name="SecondComputerName" type="xsd:string" />
    <xsd:element name="SecondLogName" type="xsd:string" />
    <xsd:element name="SecondExpression" type="ExpressionType" />
  </Configuration>
  <MonitorImplementation>
    <MemberModules>
      <DataSource TypeID="Microsoft.Windows.EventProvider"
      ID="FirstDataSource">
        <ComputerName>$Config/FirstComputerName$</ComputerName>
        <LogName>$Config/FirstLogName$</LogName>
      </DataSource>
      <DataSource TypeID="Microsoft.Windows.EventProvider"
      ID="SecondDataSource">
        <ComputerName>$Config/SecondComputerName$</ComputerName>
        <LogName>$Config/SecondLogName$</LogName>
      </DataSource>
      <ConditionDetection TypeID="System!System.ExpressionFilter"
      ID="FirstFilterCondition">
        <Expression>$Config/FirstExpression$</Expression>
      </ConditionDetection>
      <ConditionDetection TypeID="System!System.ExpressionFilter" ID="SecondFilterCondition">
        <Expression>$Config/SecondExpression$</Expression>
      </ConditionDetection>
    </MemberModules>
    <RegularDetections>
      <RegularDetection MonitorTypeStateID="FirstEventRaised">
        <Node ID="FirstFilterCondition">
          <Node ID="FirstDataSource" />
        </Node>
      </RegularDetection>
      <RegularDetection MonitorTypeStateID="SecondEventRaised">
        <Node ID="SecondFilterCondition">
          <Node ID="SecondDataSource" />
        </Node>
      </RegularDetection>
    </RegularDetections>
  </MonitorImplementation>
</UnitMonitorType>

See Also

Reference

MonitorTypes
Monitors