<?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 extract different sourcetypes from the same file in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-different-sourcetypes-from-the-same-file/m-p/410394#M118403</link>
    <description>&lt;P&gt;@splunkuzleuven - If you already have control over writing log file then I would suggest that you write message part as JSON only. As doing props and transforms will be a performance downside in this case as it will require to go through the _raw event with regex.&lt;/P&gt;</description>
    <pubDate>Sun, 09 Jun 2019 05:19:45 GMT</pubDate>
    <dc:creator>VatsalJagani</dc:creator>
    <dc:date>2019-06-09T05:19:45Z</dc:date>
    <item>
      <title>How to extract different sourcetypes from the same file</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-different-sourcetypes-from-the-same-file/m-p/410392#M118401</link>
      <description>&lt;P&gt;I'm wondering if/how I can do the following:&lt;/P&gt;

&lt;P&gt;I have a JSON structured file that is being parsed perfectly as JSON, so I get all my fields.&lt;BR /&gt;
However, there is a certain field, let's call it "message" that is a standard web Access log.&lt;/P&gt;

&lt;P&gt;So currently, I'm reading the log file and parse it as a json, and that works perfectly, except that the value of "message" is just a textblob of course.  &lt;STRONG&gt;How can I parse the "message" part as well, so that all fields are being extraced at indextime?&lt;BR /&gt;
Can I somehow combine sourcetypes?&lt;/STRONG&gt;&lt;BR /&gt;
I want to have all fields related to the same event though so that searching is easier.&lt;/P&gt;

&lt;P&gt;Is this possible?  Or will I need to JSON my "message" part as well before writing it to a log file?&lt;/P&gt;</description>
      <pubDate>Fri, 07 Jun 2019 13:47:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-different-sourcetypes-from-the-same-file/m-p/410392#M118401</guid>
      <dc:creator>splunkuzleuven</dc:creator>
      <dc:date>2019-06-07T13:47:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract different sourcetypes from the same file</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-different-sourcetypes-from-the-same-file/m-p/410393#M118402</link>
      <description>&lt;P&gt;You can't parse part of an event as one sourcetype and another part as a different sourcetype. If it's necessary to read it as that particular sourcetype you should split the content off before it reaches Splunk and read it in separately under a different sourcetype. If that's not an option you could (though I really don't recommend it) extend the JSON sourcetype definition to include additional field extractions in props.conf&lt;/P&gt;</description>
      <pubDate>Sat, 08 Jun 2019 21:48:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-different-sourcetypes-from-the-same-file/m-p/410393#M118402</guid>
      <dc:creator>martynoconnor</dc:creator>
      <dc:date>2019-06-08T21:48:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract different sourcetypes from the same file</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-different-sourcetypes-from-the-same-file/m-p/410394#M118403</link>
      <description>&lt;P&gt;@splunkuzleuven - If you already have control over writing log file then I would suggest that you write message part as JSON only. As doing props and transforms will be a performance downside in this case as it will require to go through the _raw event with regex.&lt;/P&gt;</description>
      <pubDate>Sun, 09 Jun 2019 05:19:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-different-sourcetypes-from-the-same-file/m-p/410394#M118403</guid>
      <dc:creator>VatsalJagani</dc:creator>
      <dc:date>2019-06-09T05:19:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract different sourcetypes from the same file</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-different-sourcetypes-from-the-same-file/m-p/410395#M118404</link>
      <description>&lt;P&gt;Okay, it's what I was afraid of already.  Thanks for the feedback.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jun 2019 07:48:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-different-sourcetypes-from-the-same-file/m-p/410395#M118404</guid>
      <dc:creator>splunkuzleuven</dc:creator>
      <dc:date>2019-06-11T07:48:38Z</dc:date>
    </item>
  </channel>
</rss>

