<?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 to remove headers from a custom app log file? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-remove-headers-from-a-custom-app-log-file/m-p/176248#M35340</link>
    <description>&lt;P&gt;Based on this blog post (&lt;A href="http://blogs.splunk.com/2013/10/22/dropping-useless-headers-in-splunk-6/" target="_blank"&gt;http://blogs.splunk.com/2013/10/22/dropping-useless-headers-in-splunk-6/&lt;/A&gt;) I think what you want to do with the  FIELD_HEADER_REGEX to get splunk to skip the file header, is to match the last line of a file header so the following might work for you:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;FIELD_HEADER_REGEX=^File:
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 28 Sep 2020 18:36:35 GMT</pubDate>
    <dc:creator>chanfoli</dc:creator>
    <dc:date>2020-09-28T18:36:35Z</dc:date>
    <item>
      <title>How to remove headers from a custom app log file?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-remove-headers-from-a-custom-app-log-file/m-p/176247#M35339</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I'd like to remove some headers from a custom app logfile.  I've tried some configs, but can't get it to work.&lt;/P&gt;

&lt;P&gt;Here's my props (which doesn't filter out the lines).&lt;/P&gt;

&lt;P&gt;ANNOTATE_PUNCT = false&lt;BR /&gt;
KV_MODE = auto&lt;BR /&gt;
LINE_BREAKER = ([\r\n]+)\d{2}:\d{2}:\d{2}.\d{3}&lt;BR /&gt;
MAX_TIMESTAMP_LOOKAHEAD = 150&lt;BR /&gt;
NO_BINARY_CHECK = 1&lt;BR /&gt;
FIELD_HEADER_REGEX=^Genesys*+File&lt;BR /&gt;
SHOULD_LINEMERGE = false&lt;BR /&gt;
TRUNCATE = 999999&lt;/P&gt;

&lt;P&gt;Here's some sample data - I'd like to remove everything from Genesys to (and including) the File line. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Genesys Orchestration, Version:'8.1.300.46'
Copyright (c) 2008-2013 Genesys Telecommunications Laboratories, Inc.
Component versions:
Commonlib:        8.1.300.29 C2
Loglib:           8.1.300.09 MT
Gmessagelib:      8.1.300.00
GServicelib:      8.1.300.06 MT
Confservlib:      8.1.300.06
Lcalib:           8.1.300.07
T-library         8.1.200.05 HA
SCXMLlib          8.1.300.52
Build platform:   i686-linux-rhe5,64bit
Application name: ORS_RTP_Node1_BK
Application type: OrchestrationServer (161)
Command line:     ./orchestration -app ORS_RTP_Node1_BK -host myhost -port 2120 
Host name:        myhost
DST:              TZ = 1, timeb = 0
Time zone:        18000, EST, EDT
UTC time:         2015-01-07T18:31:25.493
Local time:       2015-01-07T13:31:25.493
Start time (UTC): 2014-09-13T05:50:00
Running time:     116:12:41:25
Host info:        Linux, abcdef, 2.6.18-371.8.1.0.1.el5, #1 SMP Thu Apr 24 13:43:12 PDT 2014, x86_64
File:             (981) /host123/logs/ORS_RTP_Node1_B/ORS_RTP_Node1_BK.20150107_133125_493.log

13:31:25.493 [ORSCallMonitor] OnCallInfoChanged
13:31:25.493 [IDX]: &amp;gt;&amp;gt; GET &amp;gt;&amp;gt; FMID=01MSGO2AM0A9F7MAJJ45U2LAES0018GG NOT FOUND
13:31:25.493 &amp;lt;&amp;lt;&amp;lt;=== 'EventCallDataChanged'(161) seq=98d28e
13:31:25.493 Int 04543 Interaction message "EventCallDataChanged" received from 66723
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 28 Sep 2020 18:35:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-remove-headers-from-a-custom-app-log-file/m-p/176247#M35339</guid>
      <dc:creator>a212830</dc:creator>
      <dc:date>2020-09-28T18:35:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove headers from a custom app log file?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-remove-headers-from-a-custom-app-log-file/m-p/176248#M35340</link>
      <description>&lt;P&gt;Based on this blog post (&lt;A href="http://blogs.splunk.com/2013/10/22/dropping-useless-headers-in-splunk-6/" target="_blank"&gt;http://blogs.splunk.com/2013/10/22/dropping-useless-headers-in-splunk-6/&lt;/A&gt;) I think what you want to do with the  FIELD_HEADER_REGEX to get splunk to skip the file header, is to match the last line of a file header so the following might work for you:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;FIELD_HEADER_REGEX=^File:
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 28 Sep 2020 18:36:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-remove-headers-from-a-custom-app-log-file/m-p/176248#M35340</guid>
      <dc:creator>chanfoli</dc:creator>
      <dc:date>2020-09-28T18:36:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove headers from a custom app log file?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-remove-headers-from-a-custom-app-log-file/m-p/176249#M35341</link>
      <description>&lt;P&gt;Failing the above, you could also try:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;HEADER_FIELD_LINE_NUMBER = 25
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The use of either option assumes that your application will not be appending headers to the same log if it is restarted and that the number of header lines remains consistent. If this is not the case then you will need to come up with a regex which matches all the header lines ( I am thinking of matching on not starting with a time string) and use a transform to send matching lines to the null queue.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jan 2015 17:09:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-remove-headers-from-a-custom-app-log-file/m-p/176249#M35341</guid>
      <dc:creator>chanfoli</dc:creator>
      <dc:date>2015-01-08T17:09:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove headers from a custom app log file?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-remove-headers-from-a-custom-app-log-file/m-p/176250#M35342</link>
      <description>&lt;P&gt;Awesome. Thanks!  Nice and simple. &lt;/P&gt;</description>
      <pubDate>Thu, 08 Jan 2015 18:19:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-remove-headers-from-a-custom-app-log-file/m-p/176250#M35342</guid>
      <dc:creator>a212830</dc:creator>
      <dc:date>2015-01-08T18:19:00Z</dc:date>
    </item>
  </channel>
</rss>

