<?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 the below json file into multi events in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-Split-the-below-json-file-into-multi-events/m-p/491191#M83937</link>
    <description>&lt;P&gt;How exactly do you want it split? What within the JSON posted do you consider an event breaker?&lt;/P&gt;</description>
    <pubDate>Mon, 30 Sep 2019 08:41:58 GMT</pubDate>
    <dc:creator>martynoconnor</dc:creator>
    <dc:date>2019-09-30T08:41:58Z</dc:date>
    <item>
      <title>How to Split the below json file into multi events</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-Split-the-below-json-file-into-multi-events/m-p/491190#M83936</link>
      <description>&lt;P&gt;Hi Folks,&lt;/P&gt;

&lt;P&gt;Kindly help me to figure out dividing the below logs into each events.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;     {
        "SecurityGroups": [
            {
                "Description": "default VPC security group",
                "GroupId": "abcd",
                "GroupName": "default",
                "IpPermissions": [
                    {
                        "FromPort": 23,
                        "IpProtocol": "tcp",
                        "IpRanges": [
                            {
                                "CidrIp": "0.0.0.0/0"
                            }
                        ],
                        "Ipv6Ranges": [
                            {
                                "CidrIpv6": "::/0"
                            }
                        ],
                        "PrefixListIds": [],
                        "ToPort": 22,
                        "UserIdGroupPairs": []
                    },
                    {
                        "FromPort": 443,
                        "IpProtocol": "tcp",
                        "IpRanges": [
                            {
                                "CidrIp": "0.0.0.0/0",
                                "Description": "For logs"
                            }
                        ],
                        "Ipv6Ranges": [
                            {
                                "CidrIpv6": "::/0",
                                "Description": "For logs"
                            }
                        ],
                        "PrefixListIds": [],
                        "ToPort": 443,
                        "UserIdGroupPairs": []
                    }
                ],
                "IpPermissionsEgress": [],
                "OwnerId": "##########",
                "VpcId": "vpc-#############"
            },
            {
                "Description": "launch-wizard-10 created 2019-03-27T18:10:47.749-07:00",
                "GroupId": "sg-#############",
                "GroupName": "launch-wizard-10",
                "IpPermissions": [
                    {
                        "FromPort": 22,
                        "IpProtocol": "tcp",
                        "IpRanges": [
                            {
                                "CidrIp": "0.0.0.0/0"
                            }
                        ],
                        "Ipv6Ranges": [],
                        "PrefixListIds": [],
                        "ToPort": 22,
                        "UserIdGroupPairs": []
                    }
                ],
                "IpPermissionsEgress": [
                    {
                        "IpProtocol": "-1",
                        "IpRanges": [
                            {
                                "CidrIp": "0.0.0.0/0"
                            }
                        ],
                        "Ipv6Ranges": [],
                        "PrefixListIds": [],
                        "UserIdGroupPairs": []
                    }
                ],
                "OwnerId": "439086027177",
                "VpcId": "vpc-01d67bc62cd3d2d62"
            },
            {
                "Description": "Security Group",
                "GroupId": "##############",
                "GroupName": "prd-#################",
                "IpPermissions": [
                    {
                        "FromPort": 8093,
                        "IpProtocol": "tcp",
                        "IpRanges": [
                            {
                                "CidrIp": "10.0.0.1/25",
                                "Description": "############"
                            }
                        ],
                        "Ipv6Ranges": [],
                        "PrefixListIds": [],
                        "ToPort": 9093,
                        "UserIdGroupPairs": [
                            {
                                "Description": "########## ",
                                "GroupId": "##########",
                                "UserId": "#############"
                            }
                        ]
                    },
                    {
                        "FromPort": 9090,
                        "IpProtocol": "tcp",
                        "IpRanges": [
                            {
                                "CidrIp": "10.0.0.1/19",
                                "Description": "############"
                            }
                        ],
                        "Ipv6Ranges": [],
                        "PrefixListIds": [],
                        "ToPort": 3899,
                        "UserIdGroupPairs": [
                            {
                                "Description": "######### ",
                                "GroupId": "############",
                                "UserId": "##############"
                            }
                        ]
                    },
                    {
                        "FromPort": 8080,
                        "IpProtocol": "tcp",
                        "IpRanges": [
                            {
                                "CidrIp": "10.0.0.1/23",
                                "Description": "#########"
                            }
                        ],
                        "Ipv6Ranges": [],
                        "PrefixListIds": [],
                        "ToPort": 443,
                        "UserIdGroupPairs": [
                            {
                                "Description": "HTTPS port",
                                "GroupId": "#############",
                                "UserId": "##############"
                            }
                        ]
                    }
                ],
                "IpPermissionsEgress": [
                    {
                        "IpProtocol": "-1",
                        "IpRanges": [
                            {
                                "CidrIp": "0.0.0.0/0"
                            }
                        ],
                        "Ipv6Ranges": [],
                        "PrefixListIds": [],
                        "UserIdGroupPairs": []
                    }
                ],
                "OwnerId": "439086027177",
                "Tags": [
                    {
                        "Key": "####",
                        "Value": "#######"
                    },
                    {
                        "Key": "#########",
                        "Value": "################"
                    },
                    {
                        "Key": "####",
                        "Value": "#####"
                    },
                    {
                        "Key": "Name",
                        "Value": "############"
                    }
                ],
                "VpcId": "vpc-#################"    
                }
           ]
   }
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Awaiting for a quick response . Kindly reply on the post.&lt;/P&gt;

&lt;P&gt;I tried the below method but failed at writing the REGEX.&lt;/P&gt;

&lt;P&gt;&lt;A href="https://answers.splunk.com/answers/642050/how-to-split-the-following-json-into-different-eve.html"&gt;https://answers.splunk.com/answers/642050/how-to-split-the-following-json-into-different-eve.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Sep 2019 08:26:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-Split-the-below-json-file-into-multi-events/m-p/491190#M83936</guid>
      <dc:creator>Inayath_khan</dc:creator>
      <dc:date>2019-09-30T08:26:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to Split the below json file into multi events</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-Split-the-below-json-file-into-multi-events/m-p/491191#M83937</link>
      <description>&lt;P&gt;How exactly do you want it split? What within the JSON posted do you consider an event breaker?&lt;/P&gt;</description>
      <pubDate>Mon, 30 Sep 2019 08:41:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-Split-the-below-json-file-into-multi-events/m-p/491191#M83937</guid>
      <dc:creator>martynoconnor</dc:creator>
      <dc:date>2019-09-30T08:41:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to Split the below json file into multi events</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-Split-the-below-json-file-into-multi-events/m-p/491192#M83938</link>
      <description>&lt;P&gt;The lack of a timestamp is an issue - cause if you're reading all of these from a single JSON, you'll have Splunk thinking everything happened at once, at the point of ingest.&lt;/P&gt;

&lt;P&gt;Anyway, you can break the JSON into events using BREAK_ONLY_BEFORE = \"Description\":\s+\"[\w\s]+\" in your sourcetype definition and by disabling INDEXED_EXTRACTIONS = json, but then by telling Splunk to ignore its normal parsing of JSON, you lose all of the extracted fields, and you'll need to use EXTRACT-blah in props to pull things out.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 02:21:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-Split-the-below-json-file-into-multi-events/m-p/491192#M83938</guid>
      <dc:creator>martynoconnor</dc:creator>
      <dc:date>2020-09-30T02:21:33Z</dc:date>
    </item>
  </channel>
</rss>

