<?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 split JSON array into Multiple events at Index Time? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-split-JSON-array-into-Multiple-events-at-Index-Time/m-p/390399#M113707</link>
    <description>&lt;P&gt;Solved with the following config:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[sourcetype]
KV_MODE = json
LINE_BREAKER = \}(,\s+)\{
SEDCMD-remove_footer = s/\}\s+\]//g
SEDCMD-remove_header = s/\{\s+\"local\"\:\s+\[//g
SHOULD_LINEMERGE = 0
pulldown_type = 1
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 04 Apr 2019 18:35:05 GMT</pubDate>
    <dc:creator>mayurr98</dc:creator>
    <dc:date>2019-04-04T18:35:05Z</dc:date>
    <item>
      <title>How to split JSON array into Multiple events at Index Time?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-split-JSON-array-into-Multiple-events-at-Index-Time/m-p/390397#M113705</link>
      <description>&lt;P&gt;&lt;STRONG&gt;I have an event :&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;{
    "local": [
        {
            "display_name": "juniper0",
            "tenant": null,
            "created": "2019-03-29",
            "local_context_data": {
                "ntp": {
                    "peers": [
                        "192.168.10.15",
                        "192.168.10.16"
                    ]
                }
            },
            "serial": "124334",
            "asset_tag": null,
            "site": {
                "id": 1,
                "name": "TestSite",
                "slug": "testsite"
            },
            "virtual_chassis": null,
            "primary_ip4": {
                "id": 7,
                "address": "192.37.28.78/24",
                "family": 4
            },
            "cluster": null,
            "tags": [],
            "last_updated": "2019-04-01T09:41:41.633296Z",
            "vc_position": null,
            "primary_ip": {
                "id": 7,
                "address": "192.37.28.78/24",
                "family": 4
            },
            "device_type": {
                "id": 1,
                "display_name": "Juniper test",
                "manufacturer": {
                    "id": 5,
                    "name": "Juniper",
                    "slug": "juniper"
                },
                "slug": "test",
                "model": "test"
            },
            "primary_ip6": null,
            "parent_device": null,
            "face": null,
            "device_role": {
                "id": 3,
                "name": "Switch",
                "slug": "switch"
            },
            "comments": "",
            "platform": null,
            "name": "juniper0",
            "id": 8,
            "status": {
                "value": 1,
                "label": "Active"
            },
            "position": null,
            "custom_fields": {},
            "rack": null,
            "vc_priority": null
        },
        {
            "display_name": "juniper1",
            "tenant": null,
            "created": "2019-04-02",
            "local_context_data": null,
            "serial": "",
            "asset_tag": null,
            "site": {
                "id": 1,
                "name": "TestSite",
                "slug": "testsite"
            },
            "virtual_chassis": null,
            "primary_ip4": null,
            "cluster": null,
            "tags": [],
            "last_updated": "2019-04-02T18:08:16.222025Z",
            "vc_position": null,
            "primary_ip": null,
            "device_type": {
                "id": 1,
                "display_name": "Juniper test",
                "manufacturer": {
                    "id": 5,
                    "name": "Juniper",
                    "slug": "juniper"
                },
                "slug": "test",
                "model": "test"
            },
            "primary_ip6": null,
            "parent_device": null,
            "face": null,
            "device_role": {
                "id": 6,
                "name": "Firewall",
                "slug": "firewall"
            },
            "comments": "",
            "platform": null,
            "name": "juniper1",
            "id": 9,
            "status": {
                "value": 1,
                "label": "Active"
            },
            "position": null,
            "custom_fields": {},
            "rack": null,
            "vc_priority": null
        }
    ]
}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I want this event to be split into 2 events such as : &lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;1st Event&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;{
             "display_name": "juniper0",
             "tenant": null,
             "created": "2019-03-29",
             "local_context_data": {
                 "ntp": {
                     "peers": [
                         "192.168.10.15",
                         "192.168.10.16"
                     ]
                 }
             },
             "serial": "124334",
             "asset_tag": null,
             "site": {
                 "id": 1,
                 "name": "TestSite",
                 "slug": "testsite"
             },
             "virtual_chassis": null,
             "primary_ip4": {
                 "id": 7,
                 "address": "192.37.28.78/24",
                 "family": 4
             },
             "cluster": null,
             "tags": [],
             "last_updated": "2019-04-01T09:41:41.633296Z",
             "vc_position": null,
             "primary_ip": {
                 "id": 7,
                 "address": "192.37.28.78/24",
                 "family": 4
             },
             "device_type": {
                 "id": 1,
                 "display_name": "Juniper test",
                 "manufacturer": {
                     "id": 5,
                     "name": "Juniper",
                     "slug": "juniper"
                 },
                 "slug": "test",
                 "model": "test"
             },
             "primary_ip6": null,
             "parent_device": null,
             "face": null,
             "device_role": {
                 "id": 3,
                 "name": "Switch",
                 "slug": "switch"
             },
             "comments": "",
             "platform": null,
             "name": "juniper0",
             "id": 8,
             "status": {
                 "value": 1,
                 "label": "Active"
             },
             "position": null,
             "custom_fields": {},
             "rack": null,
             "vc_priority": null
         }
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;2nd Event&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;{
             "display_name": "juniper1",
             "tenant": null,
             "created": "2019-04-02",
             "local_context_data": null,
             "serial": "",
             "asset_tag": null,
             "site": {
                 "id": 1,
                 "name": "TestSite",
                 "slug": "testsite"
             },
             "virtual_chassis": null,
             "primary_ip4": null,
             "cluster": null,
             "tags": [],
             "last_updated": "2019-04-02T18:08:16.222025Z",
             "vc_position": null,
             "primary_ip": null,
             "device_type": {
                 "id": 1,
                 "display_name": "Juniper test",
                 "manufacturer": {
                     "id": 5,
                     "name": "Juniper",
                     "slug": "juniper"
                 },
                 "slug": "test",
                 "model": "test"
             },
             "primary_ip6": null,
             "parent_device": null,
             "face": null,
             "device_role": {
                 "id": 6,
                 "name": "Firewall",
                 "slug": "firewall"
             },
             "comments": "",
             "platform": null,
             "name": "juniper1",
             "id": 9,
             "status": {
                 "value": 1,
                 "label": "Active"
             },
             "position": null,
             "custom_fields": {},
             "rack": null,
             "vc_priority": null
         }
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 03 Apr 2019 22:48:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-split-JSON-array-into-Multiple-events-at-Index-Time/m-p/390397#M113705</guid>
      <dc:creator>mayurr98</dc:creator>
      <dc:date>2019-04-03T22:48:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to split JSON array into Multiple events at Index Time?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-split-JSON-array-into-Multiple-events-at-Index-Time/m-p/390398#M113706</link>
      <description>&lt;P&gt;@mayurr98 &lt;/P&gt;

&lt;P&gt;Can you please try below configurations in your props.conf?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[my_stanza]
DATETIME_CONFIG=CURRENT
SHOULD_LINEMERGE=true
NO_BINARY_CHECK=true
LINE_BREAKER=}(\,){
SEDCMD-break=s/({"local": \[)//g
SEDCMD-b=s/]}$//g
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 04 Apr 2019 06:14:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-split-JSON-array-into-Multiple-events-at-Index-Time/m-p/390398#M113706</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2019-04-04T06:14:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to split JSON array into Multiple events at Index Time?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-split-JSON-array-into-Multiple-events-at-Index-Time/m-p/390399#M113707</link>
      <description>&lt;P&gt;Solved with the following config:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[sourcetype]
KV_MODE = json
LINE_BREAKER = \}(,\s+)\{
SEDCMD-remove_footer = s/\}\s+\]//g
SEDCMD-remove_header = s/\{\s+\"local\"\:\s+\[//g
SHOULD_LINEMERGE = 0
pulldown_type = 1
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 04 Apr 2019 18:35:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-split-JSON-array-into-Multiple-events-at-Index-Time/m-p/390399#M113707</guid>
      <dc:creator>mayurr98</dc:creator>
      <dc:date>2019-04-04T18:35:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to split JSON array into Multiple events at Index Time?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-split-JSON-array-into-Multiple-events-at-Index-Time/m-p/390400#M113708</link>
      <description>&lt;P&gt;Thanks for the reply &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Apr 2019 18:36:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-split-JSON-array-into-Multiple-events-at-Index-Time/m-p/390400#M113708</guid>
      <dc:creator>mayurr98</dc:creator>
      <dc:date>2019-04-04T18:36:11Z</dc:date>
    </item>
  </channel>
</rss>

