UnitMonitor
Applies To: System Center 2012 - Operations Manager, System Center 2012 R2 Operations Manager, System Center 2012 SP1 - Operations Manager
Defines an implementation of a unit monitor type definition that determines the health of targeted class type instances.
Schema Hierarchy
ManagementPack
Monitoring
Monitors
UnitMonitor
Syntax
<UnitMonitor Id=”UnitMonitorID” Comment=”Comment” Accessibility=”Public/Internal” Enabled=”True/False” Target=”TargetClassID” ParentMonitorID=”ParentMonitorID” Remotable=”True/False” Priority=”Normal” RunAs=”SecureReferenceID” TypeID=”UnitMonitorTypeID”>
<Category></Category>
<AlertSettings AlertMessage=”StringResourceID”>…</AlertSettings>
<OperationalStates>…</OperationalStates>
<Configuration>…</Configuration>
</UnitMonitor>
Attributes and Elements
The following sections describe attributes, child elements, and the parent element of a UnitMonitor 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. |
Enabled |
Required attribute. Defines whether or not this monitor is by default enabled or disabled. |
Target |
Required attribute. The ID of the targeted class type. |
ParentMonitorID |
Required attribute. The monitor to which this monitor rolls up on the same class type. |
Remotable |
Optional attribute. Defines whether or not this monitor will run for agentless monitoring. Default value is true. |
Accessibility |
Required attribute. Defines the visibility of the monitor. |
RunAs |
Optional attribute. Refers to a SecureReference type ID. All instances of this monitor type will run under the credentials set for the secure reference. |
TypeID |
Required attribute. The ID UnitMonitorType type from which this monitor gets its configuration schema definition. |
Priority |
Optional attribute for internal use only. If specified, always set to “Normal.” |
Accessibility Attribute Values
Value | Description |
---|---|
Public |
Indicates that the monitor is visible to external management packs. |
Internal |
Indicates that the monitor is not visible to external management packs. |
Enabled Attribute Values
Value | Description |
---|---|
True |
The monitor is enabled when its target class has been discovered. |
False |
The monitor is disabled even when its target class has been discovered. |
Child Elements
Element | Description |
---|---|
Required element. Represents the category name of a unit monitor. |
|
Optional element. Defines the alert to generate when the monitor reflects a specified unhealthy state. |
|
Required element. Contains mappings between health states and the monitor type states defined in the monitor’s unit monitor type. |
|
Required element. Provides the appropriate configuration data based on the configuration schema defined in a monitor’s unit monitor type. |
Parent Elements
Element | Description |
---|---|
Contains monitor definitions targeted at a specific class type. |
Remarks
Unit monitors are implementations of the various unit monitor types that are defined in the core system management packs. Each unit monitor type accesses instrumentation data from such sources as Windows events, Windows performance, application logs, and Simple Network Management Protocol (SNMP). These types define a workflow that is designed to determine the two or three operational states of the monitor. A unit monitor type is health agnostic and serves to provide the workflow framework and configuration definition of the monitor. For more information, see UnitMonitorType.
The unit monitor serves to implement any one of the unit monitor types. It is responsible for mapping its own health state to the monitor type states that are defined by the unit monitor type. It is also responsible for providing the correct configuration XML in accordance with the type schema.
Unit monitors always roll up to a parent aggregate monitor and, ultimately, up to one of the aggregate monitors that are defined in the System.Library management pack. For more information, see AggregateMonitor
Example
The following XML sample demonstrates how to define a unit monitor of a predefined monitor type, Microsoft.Windows.2SingleEventLog2StateMonitorType
, which uses the Windows event log to collect instrumentation data. To view the definition of Microsoft.Windows.2SingleEventLog2StateMonitorType
, see UnitMonitorType.
<UnitMonitor ID="Microsoft.Windows.Client.Vista.NetworkAdapter.NetworkAdapterConnectionHealth" Accessibility="Public" Enabled="false" Target="Vista!Microsoft.Windows.Client.Vista.NetworkAdapter" ParentMonitorID="SystemHealth!System.Health.AvailabilityState" Remotable="true" Priority="Normal" TypeID="Windows!Microsoft.Windows.2SingleEventLog2StateMonitorType" ConfirmDelivery="false">
<Category>AvailabilityHealth</Category>
<AlertSettings AlertMessage="Microsoft.Windows.Client.Vista.NetworkAdapter.NetworkAdapterConnectionHealth.AlertMessage">
<AlertOnState>Error</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>Error</AlertSeverity>
<AlertParameters>
<AlertParameter1>$Target/Property[Type="System!System.Entity"]/DisplayName$</AlertParameter1>
</AlertParameters>
</AlertSettings>
<OperationalStates>
<OperationalState ID="Disconnected" MonitorTypeStateID="FirstEventRaised" HealthState="Error" />
<OperationalState ID="Connected" MonitorTypeStateID="SecondEventRaised" HealthState="Success" />
</OperationalStates>
<Configuration>
<FirstComputerName>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</FirstComputerName>
<FirstLogName>System</FirstLogName>
<FirstExpression>
<And>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery>EventSourceName</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value>Tcpip</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<And>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery>Params/Param[2]</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value>$Target/Property[Type="System!System.Entity"]/DisplayName$</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery>EventDisplayNumber</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value>4202</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</And>
</Expression>
<Expression>
<Not>
<Expression>
<SimpleExpression>
<ValueExpression>
<Value>$Target/Property[Type="WindowsClient!Microsoft.Windows.Client.NetworkAdapter"]/AdapterType$</Value>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value>Wireless</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</Not>
</Expression>
<Expression>
<Not>
<Expression>
<SimpleExpression>
<ValueExpression>
<Value>$Target/Property[Type="WindowsClient!Microsoft.Windows.Client.NetworkAdapter"]/AdapterType$</Value>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value>Infrared Wireless</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</Not>
</Expression>
</And>
</FirstExpression>
<SecondComputerName>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</SecondComputerName>
<SecondLogName>System</SecondLogName>
<SecondExpression>
<And>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery>EventSourceName</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value>Tcpip</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<And>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery>Params/Param[2]</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value>$Target/Property[Type="System!System.Entity"]/DisplayName$</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery>EventDisplayNumber</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value>4201</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</And>
</Expression>
</And>
</SecondExpression>
</Configuration>
</UnitMonitor>