System.ApplicationLog.GenericCSVLog.EventProvider
Applies To: Operations Manager 2007 R2
The System.ApplicationLog.GenericCSVLog.EventProvider data source module type is used to provide entry data from a directory that contains non-delimited text-based generic log files. This module returns each generic log file’s entry data as System.Event.Data data.
Usage
Use the module to provide generic log entry data within event data from within a workflow. A CSV generic log file is a file that can contain up to 30 delimited strings per log entry. If your log file includes only non-delimited text within each entry, use the System.ApplicationLog.GenericLog.EventProvider module type.
Type Definition
<DataSourceModuleType ID="System.ApplicationLog.GenericCSVLog.EventProvider" Accessibility="Public">
<Configuration>
<xsd:element name="LogFileDirectory" type="xsd:string" />
<xsd:element name="LogFilePattern" type="xsd:string" />
<xsd:element name="LogIsUTF8" type="xsd:string" />
<xsd:element name="Separator" type="xsd:string" />
</Configuration>
<ModuleImplementation>
<Composite>
<MemberModules>
<DataSource TypeID="System.ApplicationLog.GenericCSVLogReader" ID="DataSource">
<LogFileDirectory>$Config/LogFileDirectory$</LogFileDirectory>
<LogFilePattern>$Config/LogFilePattern$</LogFilePattern>
<LogIsUTF8>$Config/LogIsUTF8$</LogIsUTF8>
<Separator>$Config/Separator$</Separator>
</DataSource>
<ConditionDetection TypeID="System!System.Event.GenericDataMapper" ID="Mapper">
<EventOriginId>$Target/Id$</EventOriginId>
<PublisherId>$MPElement$</PublisherId>
<PublisherName>GenericCSVLog</PublisherName>
<Channel>GenericCSVLog</Channel>
<LoggingComputer />
<EventNumber>0</EventNumber>
<EventCategory>3</EventCategory>
<EventLevel>0</EventLevel>
<UserName />
<Params>
<Param>$Data[Default='']/Params/Param[1]$</Param>
<Param>$Data[Default='']/Params/Param[2]$</Param>
<Param>$Data[Default='']/Params/Param[3]$</Param>
<Param>$Data[Default='']/Params/Param[4]$</Param>
<Param>$Data[Default='']/Params/Param[5]$</Param>
<Param>$Data[Default='']/Params/Param[6]$</Param>
<Param>$Data[Default='']/Params/Param[7]$</Param>
<Param>$Data[Default='']/Params/Param[8]$</Param>
<Param>$Data[Default='']/Params/Param[9]$</Param>
<Param>$Data[Default='']/Params/Param[10]$</Param>
<Param>$Data[Default='']/Params/Param[11]$</Param>
<Param>$Data[Default='']/Params/Param[12]$</Param>
<Param>$Data[Default='']/Params/Param[13]$</Param>
<Param>$Data[Default='']/Params/Param[14]$</Param>
<Param>$Data[Default='']/Params/Param[15]$</Param>
<Param>$Data[Default='']/Params/Param[16]$</Param>
<Param>$Data[Default='']/Params/Param[17]$</Param>
<Param>$Data[Default='']/Params/Param[18]$</Param>
<Param>$Data[Default='']/Params/Param[19]$</Param>
<Param>$Data[Default='']/Params/Param[20]$</Param>
<Param>$Data[Default='']/Params/Param[21]$</Param>
<Param>$Data[Default='']/Params/Param[22]$</Param>
<Param>$Data[Default='']/Params/Param[23]$</Param>
<Param>$Data[Default='']/Params/Param[24]$</Param>
<Param>$Data[Default='']/Params/Param[25]$</Param>
<Param>$Data[Default='']/Params/Param[26]$</Param>
<Param>$Data[Default='']/Params/Param[27]$</Param>
<Param>$Data[Default='']/Params/Param[28]$</Param>
<Param>$Data[Default='']/Params/Param[29]$</Param>
<Param>$Data[Default='']/Params/Param[30]$</Param>
</Params>
</ConditionDetection>
</MemberModules>
<Composition>
<Node ID="Mapper">
<Node ID="DataSource" />
</Node>
</Composition>
</Composite>
</ModuleImplementation>
<OutputType>System!System.Event.Data</OutputType>
</DataSourceModuleType>
Parameters
The System.ApplicationLog.GenericCSVLog.EventProvider module supports the configuration parameters described in the following table.
Parameter | Type | Overrideable | Description |
---|---|---|---|
LogFileDirectory |
String |
False |
Required parameter. Contains the full path to the local directory from which to read the log file or files. |
LogFilePattern |
String |
False |
Required parameter. Contains the file name or wildcard pattern to match for the log files. |
LogIsUTF8 |
Boolean |
False |
Required parameter. Indicates whether the log file is UTF8-encoded. The value should be either true or false. |
For more information about all of the parameters in this module, see System.ApplicationLog.GenericLogReader.
Remarks
For remarks, see System.ApplicationLog.GenericLogReader.
Composition
The System.ApplicationLog.GenericCSVLog.EventProvider module is a composite module that contains the member modules described in the following table.
Workflow Run Order | Module Type | Usage |
---|---|---|
1 |
Reads the delimited, text-based log entries. |
|
2 |
Maps the generic log entry data to event data. |
Related Modules
Module Type | Usage |
---|---|
Maps filtered delimited, text-based generic log entry data to event data. Returns System.Event.Data data. |
|
Maps non-delimited, text-based generic log entry data to event data. Returns System.Event.Data data. |
|
Maps filtered non-delimited, text-based generic log entry data to event data. Returns System.Event.Data data. |
External Module References
None.
Sample
The following sample illustrates how a rule can be implemented to retrieve generic log entry data from any number of log files in a directory. After the module maps the log entry data to event data, the data is returned and written to the Operations Manager database and data warehouse.
<Rule ID="Microsoft.Samples.LogEntryToEvent" Target="Microsoft.Samples.TheApplication" Enabled="true">
<DataSources>
<DataSource ID="LogDS" TypeID="AppLog!System.ApplicationLog.GenericCSVLogReader">
<LogFileDirectory>C:\Logs</LogFileDirectory>
<LogFilePattern>*.log</LogFilePattern>
<LogIsUTF8>false</LogIsUTF8>
<Separator>,</Separator>
</DataSource>
</DataSources>
<WriteActions>
<WriteAction ID="WriteToDB" TypeID="SCLibrary!Microsoft.SystemCenter.CollectEvent"/>
<WriteAction ID="WriteToDW" TypeID="SCDW!Microsoft.SystemCenter.DataWarehouse.PublishEventData"/>
</WriteActions>
</Rule>
If the log entry line is This is the first column in one entry, This is the second column in one entry
, the output of the System.ApplicationLog.GenericCSVLog.EventProvider module would be something like the following:
<DataItem type="System.Event.Data" time="2008-03-11T03:08:55.0343534-08:00" sourceHealthServiceId="0A0800A0-A802-E90B-6045-D961D516CA78">
<EventOriginId>513C3E6D-374A-47d1-94B6-920EB54F9A27</EventOriginId>
<PublisherId>513C3E6D-374A-47d1-94B6-920EB54F9A27</PublisherId>
<PublisherName>GenericLog</PublisherName>
<Channel>GenericLog</Channel>
<LoggingComputer />
<EventNumber>0</EventNumber>
<EventCategory>3</EventCategory>
<EventLevel>0</EventLevel>
<UserName />
<EventData>
<DataItem type="System.ApplicationLog.GenericLogEntryData" time="2007-05-22T10:07:41.6416394-07:00" sourceHealthServiceId="A9BB62D3-BEF2-5208-E680-1EE489235408">
<LogFileDirectory>c:\Logs</LogFileDirectory>
<LogFileType>Generic CSV Log File Format</LogFileType>
<LogFileName>c:\Logs\some.log</LogFileName>
<Params>
<Param>This is the first column in one entry.</Param>
<Param>This is the second column in one entry.</Param>
</Params>
<DataItem>
</EventData>
</DataItem>
Information
Module Type |
|
Input Type |
None |
Output Type |
|
Implementation |
Composite |
Library |
System.ApplicationLog.Library |