<?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 Props and Transforms for JSON-like data? in Splunk Enterprise</title>
    <link>https://community.splunk.com/t5/Splunk-Enterprise/Props-and-Transforms-for-JSON-like-data/m-p/644568#M16434</link>
    <description>&lt;P&gt;Hi Community,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying to come up with the proper props and transforms config to ingest the data from a source that writes data in json however the json is heavily nested and contains some field value pairs that I will also like to extract within the nested json data.&amp;nbsp; Sample data included below. Thanks in advance&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The field / value that I am trying to extract is in the key="key3" value within the brackets&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;{&lt;BR /&gt;"time": "2023-05-20T12:35:20.255445557-07:00",&lt;/P&gt;
&lt;P&gt;"Key": "Value",&lt;BR /&gt;&lt;BR /&gt;"Key2": "Value2",&lt;BR /&gt;&lt;BR /&gt;"Key3": "[key3_field1=Value1] [key3_field2=Value2] [key3_field3=Value3] [key3_field4=Value4] [key3_field5=Value5]",&lt;/P&gt;
&lt;P&gt;"Key4": ["key4_value1", "key4_value2", "key4_value3", "key4_value4"],&lt;/P&gt;
&lt;P&gt;"key5" : {&lt;/P&gt;
&lt;P&gt;"key5_key1": "key5_value1",&lt;BR /&gt;&lt;BR /&gt;"key5_key2": ["key5_key2_value1", "key5_key2_value2", "key5_key2_value3"],&lt;/P&gt;
&lt;P&gt;"key5_key3": {&lt;/P&gt;
&lt;P&gt;"key5_key3_key1": "value531",&lt;/P&gt;
&lt;P&gt;"key5_key3_key2": 532 ,&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;BR /&gt;&amp;nbsp; &amp;nbsp;}&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 30 May 2023 03:30:02 GMT</pubDate>
    <dc:creator>Strangertinz</dc:creator>
    <dc:date>2023-05-30T03:30:02Z</dc:date>
    <item>
      <title>Props and Transforms for JSON-like data?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Props-and-Transforms-for-JSON-like-data/m-p/644568#M16434</link>
      <description>&lt;P&gt;Hi Community,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying to come up with the proper props and transforms config to ingest the data from a source that writes data in json however the json is heavily nested and contains some field value pairs that I will also like to extract within the nested json data.&amp;nbsp; Sample data included below. Thanks in advance&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The field / value that I am trying to extract is in the key="key3" value within the brackets&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;{&lt;BR /&gt;"time": "2023-05-20T12:35:20.255445557-07:00",&lt;/P&gt;
&lt;P&gt;"Key": "Value",&lt;BR /&gt;&lt;BR /&gt;"Key2": "Value2",&lt;BR /&gt;&lt;BR /&gt;"Key3": "[key3_field1=Value1] [key3_field2=Value2] [key3_field3=Value3] [key3_field4=Value4] [key3_field5=Value5]",&lt;/P&gt;
&lt;P&gt;"Key4": ["key4_value1", "key4_value2", "key4_value3", "key4_value4"],&lt;/P&gt;
&lt;P&gt;"key5" : {&lt;/P&gt;
&lt;P&gt;"key5_key1": "key5_value1",&lt;BR /&gt;&lt;BR /&gt;"key5_key2": ["key5_key2_value1", "key5_key2_value2", "key5_key2_value3"],&lt;/P&gt;
&lt;P&gt;"key5_key3": {&lt;/P&gt;
&lt;P&gt;"key5_key3_key1": "value531",&lt;/P&gt;
&lt;P&gt;"key5_key3_key2": 532 ,&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;BR /&gt;&amp;nbsp; &amp;nbsp;}&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 May 2023 03:30:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Props-and-Transforms-for-JSON-like-data/m-p/644568#M16434</guid>
      <dc:creator>Strangertinz</dc:creator>
      <dc:date>2023-05-30T03:30:02Z</dc:date>
    </item>
    <item>
      <title>Re: Props and Transforms for JSON-like data ?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Props-and-Transforms-for-JSON-like-data/m-p/644822#M16456</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I'm expecting that your Key3 is on one line. You could try something like this on transform.conf&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[extract-key3]
REGEX = \"Key3\":\s*\"([^\"]+)
FORMAT = Key3::$1
MV_ADD = 1&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;and props.conf&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[&amp;lt;your sourcetype here&amp;gt;]
TRANSFORMS = extract-key3&lt;/LI-CODE&gt;&lt;P&gt;If you want to take only that value from data to index it and remove other you should add needed transforms to take only Key3 and put that on index queue and other to nullQueue.&lt;/P&gt;&lt;P&gt;You can found examples for that on&amp;nbsp;&lt;A href="https://docs.splunk.com/Documentation/SplunkCloud/latest/Forwarding/Routeandfilterdatad#Filter_event_data_and_send_to_queues" target="_blank"&gt;Filter event data and send to queues&lt;/A&gt;&lt;/P&gt;&lt;P&gt;r. Ismo&lt;/P&gt;</description>
      <pubDate>Sat, 27 May 2023 14:38:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Props-and-Transforms-for-JSON-like-data/m-p/644822#M16456</guid>
      <dc:creator>isoutamo</dc:creator>
      <dc:date>2023-05-27T14:38:29Z</dc:date>
    </item>
  </channel>
</rss>

