<?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: Parse log which contain unstructured and inner-json in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Parse-log-which-contain-unstructured-and-inner-json/m-p/548551#M91198</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/233140"&gt;@gilsegev468&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There are two ways of fields extraction search-time and index-time extraction ( which means while parsing extract and write to indexer).&lt;/P&gt;&lt;P&gt;In your case a search-time extraction is fine with a combination of inline rex (same can be configured as props.conf inside Search-head)&amp;nbsp; and spath as inner-json is the one you want to extract fields from.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="venkatasri_0-1618903989423.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/13847i308CBAA4E78E9173/image-size/medium?v=v2&amp;amp;px=400" role="button" title="venkatasri_0-1618903989423.png" alt="venkatasri_0-1618903989423.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults 
| eval log_data="19-04-2021 gil-server-1 {\"systemId\":\"1254\", \"systemName\":\"coffe\", \"message\":\"hello dor\"}" 
| rex field=log_data "(?&amp;lt;inner_json&amp;gt;\{\".*)" 
| spath input=inner_json 
| table systemId systemName message&lt;/LI-CODE&gt;&lt;P&gt;If you want to use in-line rex then field=_raw (default), same regex can be configured to source/sourcetype in props.conf for search-time extraction and deploy it to Search Head.&lt;/P&gt;&lt;P&gt;---------------------------------------------&lt;/P&gt;&lt;P&gt;An upvote would be appreciated if it helps!&lt;/P&gt;</description>
    <pubDate>Tue, 20 Apr 2021 07:35:38 GMT</pubDate>
    <dc:creator>venkatasri</dc:creator>
    <dc:date>2021-04-20T07:35:38Z</dc:date>
    <item>
      <title>Parse log which contain unstructured and inner-json</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Parse-log-which-contain-unstructured-and-inner-json/m-p/548389#M91181</link>
      <description>&lt;P&gt;Hey,&lt;/P&gt;&lt;P&gt;I have a problem to parse my data:&amp;nbsp;&lt;/P&gt;&lt;P&gt;19-04-2021 gil-server-1 {"systemId":"1254", "systemName":"coffe", "message":"hello dor"}&lt;/P&gt;&lt;P&gt;I want to extract the fields before Splunk index the data.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How to configure the props.conf or the transforms.conf?&lt;/P&gt;</description>
      <pubDate>Mon, 19 Apr 2021 07:34:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Parse-log-which-contain-unstructured-and-inner-json/m-p/548389#M91181</guid>
      <dc:creator>gilsegev468</dc:creator>
      <dc:date>2021-04-19T07:34:32Z</dc:date>
    </item>
    <item>
      <title>Re: Parse log which contain unstructured and inner-json</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Parse-log-which-contain-unstructured-and-inner-json/m-p/548551#M91198</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/233140"&gt;@gilsegev468&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There are two ways of fields extraction search-time and index-time extraction ( which means while parsing extract and write to indexer).&lt;/P&gt;&lt;P&gt;In your case a search-time extraction is fine with a combination of inline rex (same can be configured as props.conf inside Search-head)&amp;nbsp; and spath as inner-json is the one you want to extract fields from.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="venkatasri_0-1618903989423.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/13847i308CBAA4E78E9173/image-size/medium?v=v2&amp;amp;px=400" role="button" title="venkatasri_0-1618903989423.png" alt="venkatasri_0-1618903989423.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults 
| eval log_data="19-04-2021 gil-server-1 {\"systemId\":\"1254\", \"systemName\":\"coffe\", \"message\":\"hello dor\"}" 
| rex field=log_data "(?&amp;lt;inner_json&amp;gt;\{\".*)" 
| spath input=inner_json 
| table systemId systemName message&lt;/LI-CODE&gt;&lt;P&gt;If you want to use in-line rex then field=_raw (default), same regex can be configured to source/sourcetype in props.conf for search-time extraction and deploy it to Search Head.&lt;/P&gt;&lt;P&gt;---------------------------------------------&lt;/P&gt;&lt;P&gt;An upvote would be appreciated if it helps!&lt;/P&gt;</description>
      <pubDate>Tue, 20 Apr 2021 07:35:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Parse-log-which-contain-unstructured-and-inner-json/m-p/548551#M91198</guid>
      <dc:creator>venkatasri</dc:creator>
      <dc:date>2021-04-20T07:35:38Z</dc:date>
    </item>
  </channel>
</rss>

