<?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 Header Field and Values in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Header-Field-and-Values/m-p/534850#M151162</link>
    <description>&lt;P&gt;I have a Splunk event with the following lines logged from a .txt file.&lt;/P&gt;&lt;P&gt;HeaderField1 | HeaderField2 | HeaderField3&lt;/P&gt;&lt;P&gt;HeaderValue1 | HeaderValue2 | HeaderValue3&lt;/P&gt;&lt;P&gt;How can I manipulate the event (and future events) using configuration files (props and/or transform) so that the event text is replaced with the following extracted fields names and values:&lt;/P&gt;&lt;P&gt;HeaderField1 = HeaderValue1&lt;/P&gt;&lt;P&gt;HeaderField2 = HeaderValue2&lt;/P&gt;&lt;P&gt;HeaderField3 = HeaderValue3&lt;/P&gt;&lt;P&gt;Note: The actual header field names are always the same. The Header Values change in each text file.&lt;/P&gt;</description>
    <pubDate>Tue, 05 Jan 2021 20:30:44 GMT</pubDate>
    <dc:creator>bartstk18</dc:creator>
    <dc:date>2021-01-05T20:30:44Z</dc:date>
    <item>
      <title>Header Field and Values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Header-Field-and-Values/m-p/534850#M151162</link>
      <description>&lt;P&gt;I have a Splunk event with the following lines logged from a .txt file.&lt;/P&gt;&lt;P&gt;HeaderField1 | HeaderField2 | HeaderField3&lt;/P&gt;&lt;P&gt;HeaderValue1 | HeaderValue2 | HeaderValue3&lt;/P&gt;&lt;P&gt;How can I manipulate the event (and future events) using configuration files (props and/or transform) so that the event text is replaced with the following extracted fields names and values:&lt;/P&gt;&lt;P&gt;HeaderField1 = HeaderValue1&lt;/P&gt;&lt;P&gt;HeaderField2 = HeaderValue2&lt;/P&gt;&lt;P&gt;HeaderField3 = HeaderValue3&lt;/P&gt;&lt;P&gt;Note: The actual header field names are always the same. The Header Values change in each text file.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jan 2021 20:30:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Header-Field-and-Values/m-p/534850#M151162</guid>
      <dc:creator>bartstk18</dc:creator>
      <dc:date>2021-01-05T20:30:44Z</dc:date>
    </item>
    <item>
      <title>Re: Header Field and Values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Header-Field-and-Values/m-p/534851#M151163</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/230202"&gt;@bartstk18&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;You can use below settings in conf files,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;props.conf
[txt_sourcetype]
REPORT-fieldname=field_headers

transforms.conf
[field_headers]
DELIMS = "|"
FIELDS = HeaderField1 HeaderField2 HeaderField3 &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If this reply helps you an upvote is appreciated.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jan 2021 21:04:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Header-Field-and-Values/m-p/534851#M151163</guid>
      <dc:creator>scelikok</dc:creator>
      <dc:date>2021-01-05T21:04:52Z</dc:date>
    </item>
    <item>
      <title>Re: Header Field and Values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Header-Field-and-Values/m-p/534853#M151165</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/206061"&gt;@scelikok&lt;/a&gt;Unfortunately this did not work. The event has been logged the same and the fields were not extracted.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jan 2021 21:33:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Header-Field-and-Values/m-p/534853#M151165</guid>
      <dc:creator>bartstk18</dc:creator>
      <dc:date>2021-01-05T21:33:21Z</dc:date>
    </item>
    <item>
      <title>Re: Header Field and Values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Header-Field-and-Values/m-p/534855#M151166</link>
      <description>&lt;P&gt;That setting should be in Search Head, and will affect already indexed and future data.&lt;/P&gt;&lt;P&gt;Can you please share a few lines of data from your txt file and your sourcetype configuration?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jan 2021 21:39:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Header-Field-and-Values/m-p/534855#M151166</guid>
      <dc:creator>scelikok</dc:creator>
      <dc:date>2021-01-05T21:39:40Z</dc:date>
    </item>
    <item>
      <title>Re: Header Field and Values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Header-Field-and-Values/m-p/534860#M151170</link>
      <description>&lt;P&gt;I've done that in the past.&amp;nbsp; The only way I could figure out to do it was to write a python script that read the file, reformatted it, and wrote the results to stdout for indexing.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jan 2021 21:59:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Header-Field-and-Values/m-p/534860#M151170</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2021-01-05T21:59:59Z</dc:date>
    </item>
  </channel>
</rss>

