带计时的基于二态事件的监视器
Microsoft.SystemCenter.DataWarehouse.2SingleEventLogTimed2StateUnitMonitorType (UnitMonitorType)
如果出现给定的良好事件,则监视器会切换到良好状态;如果出现不佳事件且在给定的时间框架内没有记录到良好事件,则监视器会切换到不佳状态。
Element properties:
Member Modules:
Overrideable Parameters:
Source Code:
<UnitMonitorType ID="Microsoft.SystemCenter.DataWarehouse.2SingleEventLogTimed2StateUnitMonitorType" Accessibility="Public">
<MonitorTypeStates>
<MonitorTypeState ID="SecondEventRaised" NoDetection="false"/>
<MonitorTypeState ID="FirstEventRaisedAndNoSecondEventRaisedInTimeInterval" NoDetection="false"/>
</MonitorTypeStates>
<Configuration>
<xsd:element name="WorkflowName" type="xsd:string"/>
<xsd:element name="FirstEventId" type="xsd:int"/>
<xsd:element name="SecondEventId" type="xsd:int"/>
<xsd:element name="TimeIntervalSeconds" type="xsd:int"/>
</Configuration>
<OverrideableParameters>
<OverrideableParameter ID="TimeIntervalSeconds" ParameterType="int" Selector="$Config/TimeIntervalSeconds$"/>
</OverrideableParameters>
<MonitorImplementation>
<MemberModules>
<DataSource TypeID="Windows!Microsoft.Windows.BaseEventProvider" ID="SecondDataSource">
<ComputerName>.</ComputerName>
<LogName>Operations Manager</LogName>
</DataSource>
<DataSource TypeID="Windows!Microsoft.Windows.BaseEventProvider" ID="CorrelatorFirstDataSource">
<ComputerName>.</ComputerName>
<LogName>Operations Manager</LogName>
</DataSource>
<DataSource TypeID="Windows!Microsoft.Windows.BaseEventProvider" ID="CorrelatorSecondDataSource">
<ComputerName>.</ComputerName>
<LogName>Operations Manager</LogName>
</DataSource>
<ConditionDetection TypeID="System!System.ExpressionFilter" ID="CorrelatorFirstFilterCondition">
<Expression>
<And>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="Integer">EventDisplayNumber</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="Integer">$Config/FirstEventId$</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="String">Params/Param[1]</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="String">$Target/ManagementGroup/Name$</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="String">Params/Param[2]</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="String">$Config/WorkflowName$</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</And>
</Expression>
</ConditionDetection>
<ConditionDetection TypeID="System!System.ExpressionFilter" ID="CorrelatorSecondFilterCondition">
<Expression>
<And>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="Integer">EventDisplayNumber</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="Integer">$Config/SecondEventId$</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="String">Params/Param[1]</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="String">$Target/ManagementGroup/Name$</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="String">Params/Param[2]</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="String">$Config/WorkflowName$</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</And>
</Expression>
</ConditionDetection>
<ConditionDetection TypeID="System!System.ExpressionFilter" ID="SecondFilterCondition">
<Expression>
<And>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="Integer">EventDisplayNumber</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="Integer">$Config/SecondEventId$</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="String">Params/Param[1]</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="String">$Target/ManagementGroup/Name$</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="String">Params/Param[2]</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="String">$Config/WorkflowName$</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</And>
</Expression>
</ConditionDetection>
<ConditionDetection TypeID="System!System.CorrelatorAutoMissingCondition" ID="MissingEventCorrelator">
<Correlator>
<CorrelationExpression/>
<Count>1</Count>
<Interval>$Config/TimeIntervalSeconds$</Interval>
<CorrelationOrder>InSequence</CorrelationOrder>
<CorrelationItemPolicy>First</CorrelationItemPolicy>
</Correlator>
</ConditionDetection>
</MemberModules>
<RegularDetections>
<RegularDetection MonitorTypeStateID="SecondEventRaised">
<Node ID="SecondFilterCondition">
<Node ID="SecondDataSource"/>
</Node>
</RegularDetection>
<RegularDetection MonitorTypeStateID="FirstEventRaisedAndNoSecondEventRaisedInTimeInterval">
<Node ID="MissingEventCorrelator">
<Node ID="CorrelatorFirstFilterCondition">
<Node ID="CorrelatorFirstDataSource"/>
</Node>
<Node ID="CorrelatorSecondFilterCondition">
<Node ID="CorrelatorSecondDataSource"/>
</Node>
</Node>
</RegularDetection>
</RegularDetections>
</MonitorImplementation>
</UnitMonitorType>