<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How do I consume an MS EntLib LAB file? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-consume-an-MS-EntLib-LAB-file/m-p/10312#M327</link>
    <description>&lt;P&gt;Note that this format is very similar to the extractions done to Splunk's own Windows Event Logs. You can look in the &lt;CODE&gt;etc/system/default/transforms.conf&lt;/CODE&gt; file at the wel-col-kv extraction (which is called on &lt;CODE&gt;WinEventLog...&lt;/CODE&gt; and &lt;CODE&gt;WMI...&lt;/CODE&gt; sources) for hints.&lt;/P&gt;</description>
    <pubDate>Tue, 06 Apr 2010 01:28:08 GMT</pubDate>
    <dc:creator>gkanapathy</dc:creator>
    <dc:date>2010-04-06T01:28:08Z</dc:date>
    <item>
      <title>How do I consume an MS EntLib LAB file?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-consume-an-MS-EntLib-LAB-file/m-p/10310#M325</link>
      <description>&lt;P&gt;In the past we've always logged all of our applications to SQL. We've used a variety of ways to do that, including home-grown and now Microsoft Enterprise Library Logging Application Block (LAB). Log4Net is also in the picture. We have LAB set to crank out files to a rolling file appender. So, pretty standard, each day, new file. The entries look like this currently: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;-----
Timestamp: 9/22/2009 4:50:04 PM Message: MPP LAB says the app is starting. Category: General Priority: -1 EventId: 1 Severity: Information Title: Machine: VDEVAPP2 Application Domain: /LM/W3SVC/1/ROOT-4-128981118015194687 Process Id: 2724 Process Name: c:\windows\system32\inetsrv\w3wp.exe Win32 Thread Id: 4052 Thread Name: Extended Properties: 
-----
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Easy enough to have Splunk read these files, but obviously we want to have every line (Fieldname:value) parsed as fields in Splunk. A complete entry is bracketed by the ----- lines. How do I go about this?&lt;/P&gt;</description>
      <pubDate>Sat, 20 Mar 2010 00:22:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-consume-an-MS-EntLib-LAB-file/m-p/10310#M325</guid>
      <dc:creator>Alan_Bradley</dc:creator>
      <dc:date>2010-03-20T00:22:43Z</dc:date>
    </item>
    <item>
      <title>Re: How do I consume an MS EntLib LAB file?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-consume-an-MS-EntLib-LAB-file/m-p/10311#M326</link>
      <description>&lt;P&gt;I think somehow answers has killed your formatting.&lt;/P&gt;

&lt;P&gt;I'm guessing this looks like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;----
Timestamp: 9/22/2009 4:50:04 PM
Message:MPP Lab says the app...
Category: blah blah 
----
Timestamp: ...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Seems like a cruel joke to have this big logging infrastructure that then creates timestamps in an ambiguous date format.  But that aside, There's various ways to handle this.&lt;/P&gt;

&lt;P&gt;You can split the events by using the BREAK_ONLY_BEFORE and similar options, or you can use a clumsier but faster approach of changing our LINE_BREAKER from the default of &lt;CODE&gt;([\r\n]+)&lt;/CODE&gt; to something like &lt;CODE&gt;([\r\n]+----[\r\n]+)&lt;/CODE&gt; At that point you'd add in &lt;CODE&gt;SHOULD_LINEMERGE=false&lt;/CODE&gt;, and splunk will then enforce that each block of text between that four dashed line will be treated as a single block of text.&lt;/P&gt;

&lt;P&gt;To extract the fields, you can use a repeat-match searchtime regex, in multiline mode, that matches something like &lt;CODE&gt;^([^:]*): (.*)$&lt;/CODE&gt;  with a FORMAT of &lt;CODE&gt;$1::$2&lt;/CODE&gt;  Ie. for each line, the text before the first colon is the field name, and the text after the colon and the space is the value.&lt;/P&gt;

&lt;P&gt;This is all assuming the file is a text file, and not a complex binary format that happens to have text blobs in it somewhere.&lt;/P&gt;</description>
      <pubDate>Thu, 25 Mar 2010 02:24:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-consume-an-MS-EntLib-LAB-file/m-p/10311#M326</guid>
      <dc:creator>jrodman</dc:creator>
      <dc:date>2010-03-25T02:24:45Z</dc:date>
    </item>
    <item>
      <title>Re: How do I consume an MS EntLib LAB file?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-consume-an-MS-EntLib-LAB-file/m-p/10312#M327</link>
      <description>&lt;P&gt;Note that this format is very similar to the extractions done to Splunk's own Windows Event Logs. You can look in the &lt;CODE&gt;etc/system/default/transforms.conf&lt;/CODE&gt; file at the wel-col-kv extraction (which is called on &lt;CODE&gt;WinEventLog...&lt;/CODE&gt; and &lt;CODE&gt;WMI...&lt;/CODE&gt; sources) for hints.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Apr 2010 01:28:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-consume-an-MS-EntLib-LAB-file/m-p/10312#M327</guid>
      <dc:creator>gkanapathy</dc:creator>
      <dc:date>2010-04-06T01:28:08Z</dc:date>
    </item>
    <item>
      <title>Re: How do I consume an MS EntLib LAB file?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-consume-an-MS-EntLib-LAB-file/m-p/10313#M328</link>
      <description>&lt;P&gt;I've struggled with the same thing.  My format is similar except my events are bounded by "----START----" and "--------------".  I set my props up like this:&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;[iis-entlib-delim]&lt;BR /&gt;
SHOULD_LINEMERGE=false&lt;BR /&gt;
LINE_BREAKER=(-+START-+)&lt;BR /&gt;
BREAK_ONLY_BEFORE_DATE = false&lt;/P&gt;

&lt;H1&gt;BREAK_ONLY_BEFORE = ^-+START-+$&lt;/H1&gt;

&lt;H1&gt;MUST_BREAK_AFTER = -+END-+&lt;/H1&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;For the most part, it works.  However, some of my events don't get broken at the proper boundary.  I still don't know why.  As you can see, I've been trying some different things, but nothing yet has solved it.  I have an open case with Splunk about this.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 18:19:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-consume-an-MS-EntLib-LAB-file/m-p/10313#M328</guid>
      <dc:creator>bsayatovic</dc:creator>
      <dc:date>2020-09-28T18:19:30Z</dc:date>
    </item>
  </channel>
</rss>

