<?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 How to pull out a header before indexing? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-pull-out-a-header-before-indexing/m-p/171645#M34638</link>
    <description>&lt;P&gt;I am attempting to index some SSRS logs.  Each log file has a header at the beginning of the file.  I would like to pull out the header before indexing.  I attempted to use PREAMBLE_REGEX but I can not get it to work.  The header always has the following format:&lt;/P&gt;

&lt;P&gt;A LOT of text &lt;/P&gt;

&lt;P&gt;I know there has to be a way to pull it out but either I am going down the wrong track with PREAMBLE_REGEX or I have a flaw in my code.  Any advice is welcome.&lt;/P&gt;</description>
    <pubDate>Wed, 31 Dec 2014 18:01:06 GMT</pubDate>
    <dc:creator>Bliide</dc:creator>
    <dc:date>2014-12-31T18:01:06Z</dc:date>
    <item>
      <title>How to pull out a header before indexing?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-pull-out-a-header-before-indexing/m-p/171645#M34638</link>
      <description>&lt;P&gt;I am attempting to index some SSRS logs.  Each log file has a header at the beginning of the file.  I would like to pull out the header before indexing.  I attempted to use PREAMBLE_REGEX but I can not get it to work.  The header always has the following format:&lt;/P&gt;

&lt;P&gt;A LOT of text &lt;/P&gt;

&lt;P&gt;I know there has to be a way to pull it out but either I am going down the wrong track with PREAMBLE_REGEX or I have a flaw in my code.  Any advice is welcome.&lt;/P&gt;</description>
      <pubDate>Wed, 31 Dec 2014 18:01:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-pull-out-a-header-before-indexing/m-p/171645#M34638</guid>
      <dc:creator>Bliide</dc:creator>
      <dc:date>2014-12-31T18:01:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to pull out a header before indexing?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-pull-out-a-header-before-indexing/m-p/171646#M34639</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;

&lt;P&gt;[&amp;lt;&amp;lt; sourcetype &amp;gt;&amp;gt;]&lt;BR /&gt;
TRANSFORMS-skiphdr= skip_header_logfile&lt;/P&gt;

&lt;P&gt;[skip_header_logfile]&lt;BR /&gt;
REGEX = &amp;lt;&amp;lt; 20-30 characters of your header line &amp;gt;&amp;gt;&lt;BR /&gt;
DEST_KEY = queue&lt;BR /&gt;
FORMAT = nullQueue&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 18:33:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-pull-out-a-header-before-indexing/m-p/171646#M34639</guid>
      <dc:creator>jayannah</dc:creator>
      <dc:date>2020-09-28T18:33:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to pull out a header before indexing?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-pull-out-a-header-before-indexing/m-p/171647#M34640</link>
      <description>&lt;P&gt;On your forwarder where you are getting this data  update your props.conf with this line from @jayannah &lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;[&amp;lt;&amp;lt; sourcetype &amp;gt;&amp;gt;]&lt;/CODE&gt;&lt;BR /&gt;
   &lt;CODE&gt;TRANSFORMS-skiphdr= skip_header_logfile&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Then create a transforms.conf in the same location and add these lines by @jayannah&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;[skip_header_logfile]&lt;/CODE&gt;&lt;BR /&gt;
  &lt;CODE&gt;REGEX = &amp;lt;&amp;lt; 20-30 characters of your header line &amp;gt;&amp;gt;&lt;/CODE&gt;&lt;BR /&gt;
   &lt;CODE&gt;DEST_KEY = queue&lt;/CODE&gt;&lt;BR /&gt;
  &lt;CODE&gt;FORMAT = nullQueue&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Jan 2015 23:51:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-pull-out-a-header-before-indexing/m-p/171647#M34640</guid>
      <dc:creator>mcronkrite</dc:creator>
      <dc:date>2015-01-28T23:51:02Z</dc:date>
    </item>
  </channel>
</rss>

