<?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: Split a nested json array with key/value pairs in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Split-a-nested-json-array-with-key-value-pairs/m-p/554298#M91859</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/127939"&gt;@kamlesh_vaghela&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Sorry one more request, do you mind explaining how this actually works?&lt;/P&gt;</description>
    <pubDate>Thu, 03 Jun 2021 13:56:26 GMT</pubDate>
    <dc:creator>shakSplunk</dc:creator>
    <dc:date>2021-06-03T13:56:26Z</dc:date>
    <item>
      <title>Split a nested json array with key/value pairs</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Split-a-nested-json-array-with-key-value-pairs/m-p/554211#M91845</link>
      <description>&lt;P class="_1qeIAgB0cPwnLhDF9XSiJM"&gt;Hi all,&lt;/P&gt;&lt;P class="_1qeIAgB0cPwnLhDF9XSiJM"&gt;Im trying to manually upload the following JSON file into splunk enterprise however its producing one event instead of creating 4, one for each timestamp.&lt;/P&gt;&lt;PRE&gt;{
    "Rows": [
        {
            "timestamp": "03-06-2021 13:52:34",
            "Region": "rcc",
            "Hostname": "lx206",
            "Version": "123",
            "Environment": "E"
        },
        {
            "timestamp": "03-06-2021 13:52:33",
            "Region": "rcc",
            "Hostname": "lx206",
            "Version": "123",
            "Environment": "E"
        },
        {
            "timestamp": "03-06-2021 13:52:32",
            "Region": "rcc",
            "Hostname": "lx206",
            "Version": "123",
            "Environment": "S"
        },
        {
            "timestamp": "03-06-2021 13:52:31",
            "Region": "rcc",
            "Hostname": "lx206",
            "Version": "123",
            "Catridge": "UPP",
            "CatridgeType": "Product",
            "Environment": "S"
        }
    ]
}&lt;/PRE&gt;&lt;P class="_1qeIAgB0cPwnLhDF9XSiJM"&gt;The following is my props.config file:&lt;/P&gt;&lt;PRE&gt;[simpleOutputVersion2]
DATETIME_CONFIG = 
INDEXED_EXTRACTIONS = json
KV_MODE = none
LINE_BREAKER = ([\r\n]+)
NO_BINARY_CHECK = true
category = Structured
description = JavaScript Object Notation format. For more information, visit http://json.org/
disabled = false
pulldown_type = true
TIMESTAMP_FIELDS = Rows{}.timestamp
TIME_FORMAT = %d-%m-%Y %H:%M:%S&lt;/PRE&gt;&lt;P class="_1qeIAgB0cPwnLhDF9XSiJM"&gt;The json input is a file and not an api reeponse. Also are there considerations I should make for truncation, adding a &lt;SPAN&gt;TRUNCATE=0 tag as well?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="_1qeIAgB0cPwnLhDF9XSiJM"&gt;Any help would be highly appreciated.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jun 2021 07:26:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Split-a-nested-json-array-with-key-value-pairs/m-p/554211#M91845</guid>
      <dc:creator>shakSplunk</dc:creator>
      <dc:date>2021-06-03T07:26:08Z</dc:date>
    </item>
    <item>
      <title>Re: Split a nested json array with key/value pairs</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Split-a-nested-json-array-with-key-value-pairs/m-p/554224#M91849</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/234998"&gt;@shakSplunk&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you please try this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[ Test123 ]
CHARSET=AUTO
LINE_BREAKER=}(,){\"timestamp\"
NO_BINARY_CHECK=true
SEDCMD-a=s/{"Rows": \[//g
SEDCMD-b=s/\]}//g
SHOULD_LINEMERGE=false&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2021-06-03 at 2.24.27 PM.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/14450iC994759A9C8CA527/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screenshot 2021-06-03 at 2.24.27 PM.png" alt="Screenshot 2021-06-03 at 2.24.27 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Thanks&lt;BR /&gt;KV&lt;BR /&gt;▄︻̷̿┻̿═━一&lt;BR /&gt;&lt;BR /&gt;If any of my reply helps you to solve the problem Or gain knowledge, an upvote would be appreciated.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jun 2021 08:54:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Split-a-nested-json-array-with-key-value-pairs/m-p/554224#M91849</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2021-06-03T08:54:38Z</dc:date>
    </item>
    <item>
      <title>Re: Split a nested json array with key/value pairs</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Split-a-nested-json-array-with-key-value-pairs/m-p/554291#M91856</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/127939"&gt;@kamlesh_vaghela&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the help - however unfortunately it didn't work on my side.&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I did was go on the web UI of splunk enterprise I've selected Settings &amp;gt; Source Types&amp;nbsp; then edited my source type with the suggested field inputs. The remaining fields popped up by default when going to click save.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've gone through the web UI as when I edit the props.conf file located in Splunk/etc/system/local and hit save, it doesn't get reflected on the web instance of splunk even when I refresh the page, however when I make an update through the web UI, it is reflected in the file.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SplunkIssue.PNG" style="width: 1013px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/14455i8223F764DC161273/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SplunkIssue.PNG" alt="SplunkIssue.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jun 2021 13:23:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Split-a-nested-json-array-with-key-value-pairs/m-p/554291#M91856</guid>
      <dc:creator>shakSplunk</dc:creator>
      <dc:date>2021-06-03T13:23:02Z</dc:date>
    </item>
    <item>
      <title>Re: Split a nested json array with key/value pairs</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Split-a-nested-json-array-with-key-value-pairs/m-p/554294#M91857</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/234998"&gt;@shakSplunk&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The new configuration will apply on new coming data. &amp;nbsp;&lt;/P&gt;&lt;P&gt;So what I suggest to validate this configuration. Create A.json file with sample events and upload to index in your local instance. &amp;nbsp;Please go through below link for same .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://dev.splunk.com/enterprise/tutorials/quickstart/adddata/" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/8.2.0/SearchTutorial/GetthetutorialdataintoSplunkhttps://dev.splunk.com/enterprise/tutorials/quickstart/adddata/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;One more thing, FYI I have tried on below _raw event.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{"Rows": [{"timestamp": "03-06-2021 13:52:34","Region": "rcc","Hostname": "lx206","Version": "123","Environment": "E"},{"timestamp": "03-06-2021 13:52:33","Region": "rcc","Hostname": "lx206","Version": "123","Environment": "E"},{"timestamp": "03-06-2021 13:52:32","Region": "rcc","Hostname": "lx206","Version": "123","Environment": "S"},{"timestamp": "03-06-2021 13:52:31","Region": "rcc","Hostname": "lx206","Version": "123","Catridge": "UPP","CatridgeType": "Product","Environment": "S"}]}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please let me know if you have multiline or any other type of event.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;BR /&gt;KV&lt;BR /&gt;▄︻̷̿┻̿═━一&lt;BR /&gt;&lt;BR /&gt;If any of my reply helps you to solve the problem Or gain knowledge, an upvote would be appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jun 2021 13:39:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Split-a-nested-json-array-with-key-value-pairs/m-p/554294#M91857</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2021-06-03T13:39:26Z</dc:date>
    </item>
    <item>
      <title>Re: Split a nested json array with key/value pairs</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Split-a-nested-json-array-with-key-value-pairs/m-p/554296#M91858</link>
      <description>&lt;P&gt;Thank you so much&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/127939"&gt;@kamlesh_vaghela&lt;/a&gt;&amp;nbsp;, realised the problem was that the input file was formatted json with line breaks and not in raw form. Thats why it was giving splunk issues. Now its all working thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jun 2021 13:49:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Split-a-nested-json-array-with-key-value-pairs/m-p/554296#M91858</guid>
      <dc:creator>shakSplunk</dc:creator>
      <dc:date>2021-06-03T13:49:59Z</dc:date>
    </item>
    <item>
      <title>Re: Split a nested json array with key/value pairs</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Split-a-nested-json-array-with-key-value-pairs/m-p/554298#M91859</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/127939"&gt;@kamlesh_vaghela&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Sorry one more request, do you mind explaining how this actually works?&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jun 2021 13:56:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Split-a-nested-json-array-with-key-value-pairs/m-p/554298#M91859</guid>
      <dc:creator>shakSplunk</dc:creator>
      <dc:date>2021-06-03T13:56:26Z</dc:date>
    </item>
    <item>
      <title>Re: Split a nested json array with key/value pairs</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Split-a-nested-json-array-with-key-value-pairs/m-p/554314#M91862</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/234998"&gt;@shakSplunk&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In simple word, we just removed unwanted character from incoming event and provided line breaker. At this point we have valid json with timestamp and this enough for Splunk with inbuilt capability of timestamp mapping &amp;nbsp;in our use case. &amp;nbsp;&lt;span class="lia-unicode-emoji" title=":face_with_tongue:"&gt;😛&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For more information, please refer below link.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://wiki.splunk.com/Community:HowIndexingWorks" target="_blank"&gt;https://wiki.splunk.com/Community:HowIndexingWorks&lt;/A&gt;&lt;/P&gt;&lt;P&gt;If my answer resolved your issue then accept the answer for Community.&amp;nbsp;&lt;/P&gt;&lt;P&gt;In case &amp;nbsp;any of my reply helps you to solve the problem Or gain knowledge, an upvote would be appreciated.&lt;/P&gt;&lt;P&gt;Thanks&lt;BR /&gt;KV&lt;BR /&gt;▄︻̷̿┻̿═━一&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jun 2021 14:28:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Split-a-nested-json-array-with-key-value-pairs/m-p/554314#M91862</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2021-06-03T14:28:30Z</dc:date>
    </item>
    <item>
      <title>Re: Split a nested json array with key/value pairs</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Split-a-nested-json-array-with-key-value-pairs/m-p/554373#M91875</link>
      <description>&lt;P&gt;Thanks for the explanation! One more question&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/127939"&gt;@kamlesh_vaghela&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What are the impacts if this is a large json file. I've seen that I may potentially have to use the TRUNCATE=0 config line. Is that true/ is&amp;nbsp; the correct solution to a large character size in in the json file?&lt;/P&gt;</description>
      <pubDate>Fri, 04 Jun 2021 00:07:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Split-a-nested-json-array-with-key-value-pairs/m-p/554373#M91875</guid>
      <dc:creator>shakSplunk</dc:creator>
      <dc:date>2021-06-04T00:07:34Z</dc:date>
    </item>
  </channel>
</rss>

