Microsoft.Windows.ScriptGenerated.EventProvider
Updated: May 18, 2012
Applies To: System Center 2012 - Operations Manager, System Center 2012 R2 Operations Manager, System Center 2012 SP1 - Operations Manager
The Microsoft.Windows.ScriptGenerated.EventProvider data source module type provides filtered Windows event data of type Microsoft.Windows.EventData from the Operations Manager event log on a Windows-based computer.
Usage
This module is commonly used to access event data that a script generated in the Operations Manager event log.
Type Definition
<DataSourceModuleType ID="Microsoft.Windows.ScriptGenerated.EventProvider" Accessibility="Public" Batching="false">
<Configuration>
<IncludeSchemaTypes>
<SchemaType>Microsoft.Windows.ComputerNameSchema</SchemaType>
</IncludeSchemaTypes>
<xsd:element name="ComputerName" type="ComputerNameType" minOccurs="0" maxOccurs="1" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
<xsd:element name="ScriptName" type="xsd:string" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
<xsd:element name="EventNumber" type="xsd:unsignedInt" minOccurs="0" maxOccurs="1" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
</Configuration>
<ModuleImplementation Isolation="Any">
<Composite>
<MemberModules>
<DataSource ID="Provider" TypeID="Microsoft.Windows.EventProvider">
<ComputerName>$Config/ComputerName$</ComputerName>
<LogName>Operations Manager</LogName>
<Expression>
<And>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="String">Params/Param[1]</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="String">$Config/ScriptName$</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<Or>
<Expression>
<SimpleExpression>
<ValueExpression>
<Value Type="String">$Config/EventNumber$</Value>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="String" />
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="String">EventDisplayNumber</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="String">$Config/EventNumber$</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</Or>
</Expression>
</And>
</Expression>
</DataSource>
</MemberModules>
<Composition>
<Node ID="Provider" />
</Composition>
</Composite>
</ModuleImplementation>
<OutputType>System!System.Event.Data</OutputType>
</DataSourceModuleType>
Parameters
The Microsoft.Windows.ScriptGenerated.EventProvider module supports the following configuration parameters.
| Parameter | Type | Description |
|---|---|---|
|
ComputerName |
Optional. Specifies the name of the computer to receive events from. If the computer name is not specified, the name of the computer that is running the script is used. |
|
|
ScriptName |
String |
Required. Specifies the name of the script that generated the events to retrieve. |
|
EventNumber |
Integer |
Optional. Indicates the event number of the event to retrieve. If this option is omitted, the module returns all events generated by that script. |
For more information about the ComputerName parameter, see Microsoft.Windows.EventProvider.
Composition
The Microsoft.Windows.ScriptGenerated.EventProvider module is a composite module that contains the member modules that are described in the following table.
| Workflow Run Order | Module Type | Usage |
|---|---|---|
|
1 |
Provides filtered Windows event data of type Microsoft.Windows.EventData from any event log on a Windows-based computer. The LogName parameter is set to OperationsManager, and the value of Parameter 1 is set to the script name. |
Related Modules
None.
External Module References
None.
Sample
The following example shows a rule that targets a specific Windows computer, and retrieves all instances of event 6022 that were logged by the LogEndToEndEvent.js script.
<Rule ID="Microsoft.SystemCenter.AgentManagement.CollectEndToEndEvent" Enabled="true" Target="SCLibrary!Microsoft.SystemCenter.ManagementServer" ConfirmDelivery="true" Remotable="true" Priority="Normal" DiscardLevel="100">
<Category>System</Category>
<DataSources>
<DataSource ID="ScriptEventProvider" TypeID="Windows!Microsoft.Windows.ScriptGenerated.EventProvider">
<ComputerName>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/PrincipalName$</ComputerName>
<ScriptName>LogEndToEndEvent.js</ScriptName>
<EventNumber>6022</EventNumber>
</DataSource>
</DataSources>
<WriteActions>
<WriteAction ID="CollectEvent" TypeID="SCLibrary!Microsoft.SystemCenter.CollectEvent" />
<WriteAction ID="WriteToDW" TypeID="SCDW!Microsoft.SystemCenter.DataWarehouse.PublishEventData" />
</WriteActions>
</Rule>
Information
|
Module Type |
|
|
Input Type |
None |
|
Output Type |
|
|
Implementation |
Composite |
|
Library |
Microsoft.Windows.Library |