The following procedure shows how to create a repeating event monitor using the Operations Manager 2007 Authoring console and Visual Studio Authoring Extensions.
This exercise applies to the following products:
Before you perform this procedure, you must first complete the following prerequisite procedures:
The Microsoft System Center team has validated this procedure as of Revision #1. We will continue to review any changes and periodically provide validations on later revisions as they are made. Please feel free to make any corrections or additions to this procedure that you think would assist other users
A sample of the completed code for each exercise is available in the TechNet Gallery. There is a separate sample for each exercise that includes the management pack completed at the end of that exercise and each preceding exercise. This strategy allows you to work through each exercise in order and then compare your results. For VSAE, this also includes the Visual Studio solution.
The event monitor created in this procedure has the following characteristics:
<
ComputerName
>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</
ComputerName
>
<
LogName
>Application</
LogName
>
<
Expression
>
<
And
>
<
Expression
>
<
SimpleExpression
>
<
ValueExpression
>
<
XPathQuery
Type
=
"UnsignedInteger"
>EventDisplayNumber</
XPathQuery
>
</
ValueExpression
>
<
Operator
>Equal</
Operator
>
<
ValueExpression
>
<
Value
Type
=
"UnsignedInteger"
>202</
Value
>
</
ValueExpression
>
</
SimpleExpression
>
</
Expression
>
<
Expression
>
<
SimpleExpression
>
<
ValueExpression
>
<
XPathQuery
Type
=
"String"
>PublisherName</
XPathQuery
>
</
ValueExpression
>
<
Operator
>Equal</
Operator
>
<
ValueExpression
>
<
Value
Type
=
"String"
>MyApplication</
Value
>
</
ValueExpression
>
</
SimpleExpression
>
</
Expression
>
</
And
>
</
Expression
>
<
RepeatedComputerName
>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$code>>
</
ValueExpression
>
</
SimpleExpression
>
</
Expression
>
&nbs</
RepeatedComputerName
>
<
RepeatedLogName
>Application</
RepeatedLogName
>
<
RepeatedExpression
>
<
And
>
<
Expression
>
<
SimpleExpression
>
<
ValueExpression
>
<
XPathQuery
Type
=
"UnsignedInteger"
>EventDisplayNumber</
XPathQuery
>
</
ValueExpression
>
<
Operator
>Equal</
Operator
>
<
ValueExpression
>
<
Value
Type
=
"UnsignedInteger"
>201</
Value
>
</
ValueExpression
>
</
SimpleExpression
>
</
Expression
>
<
Expression
>
<
SimpleExpression
>
<
ValueExpression
>
<
XPathQuery
Type
=
"String"
>PublisherName</
XPathQuery
>
</
ValueExpression
>
<
Operator
>Equal</
Operator
>
<
ValueExpression
>
<
Value
Type
=
"String"
>MyApplication</
Value
>
</
ValueExpression
>
</
SimpleExpression
>
</
Expression
>
</
And
>
</
RepeatedExpression
>
<
Consolidator
>
<
ConsolidationProperties
/>
<
TimeControl
>
<
WithinTimeSchedule
>
<
Interval
>300</
Interval
>
</
WithinTimeSchedule
>
</
TimeControl
>
<
CountingConde>
<
Timedition
>
<
Count
>3</
Count
>
<
CountMode
>OnNewItemTestOutputRestart_OnTimerSlideByOne</
CountMode
>
</
CountingCondition
>
</
Consolidator
>