<?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 index a json file  ? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/how-to-index-a-json-file/m-p/402424#M71563</link>
    <description>&lt;P&gt;If Splunk does not pick up the JSON event straight away, it is most likely not pure JSON. &lt;BR /&gt;
Put your JSON events into any JSON validator to see if it is pure JSON.&lt;/P&gt;

&lt;P&gt;cheers, MuS&lt;/P&gt;</description>
    <pubDate>Thu, 17 May 2018 04:19:49 GMT</pubDate>
    <dc:creator>MuS</dc:creator>
    <dc:date>2018-05-17T04:19:49Z</dc:date>
    <item>
      <title>how to index a json file  ?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/how-to-index-a-json-file/m-p/402423#M71562</link>
      <description>&lt;P&gt;HI,&lt;/P&gt;

&lt;P&gt;i am trying to index a local json file, but when going trough the sourcetype the predefined json source type is not reading the file properly..splunk put everything  in one line...no detecting time format or something (see attached file)&lt;/P&gt;

&lt;P&gt;this is an exemple inside the file&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;{
    "records": 
    [

        {
            "time": "2018-05-11T13:29:03Z",     
             "GatewayId": "4r566-5678-4753-968f-34568",
             "Region": "unknown",
              "operationName": "ApplicationGatewayAccess",
              "category": "ApplicationGatewayAccessLog",
            }
        ,
{
            "time": "2018-05-11T13:29:05Z",         
             "GatewayId": "4r566-ae57-dfg543-968f-xxx45t67",
             "Region": "unknown",
             "operationName": "ApplicationGatewayAccess",
             "category": "ApplicationGatewayAccessLog",
            }
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;can someone help me to figure this out ?&lt;/P&gt;

&lt;P&gt;thanks for your support&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/4970i86384B24E41D58A1/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 17 May 2018 02:18:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/how-to-index-a-json-file/m-p/402423#M71562</guid>
      <dc:creator>abilis</dc:creator>
      <dc:date>2018-05-17T02:18:31Z</dc:date>
    </item>
    <item>
      <title>Re: how to index a json file  ?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/how-to-index-a-json-file/m-p/402424#M71563</link>
      <description>&lt;P&gt;If Splunk does not pick up the JSON event straight away, it is most likely not pure JSON. &lt;BR /&gt;
Put your JSON events into any JSON validator to see if it is pure JSON.&lt;/P&gt;

&lt;P&gt;cheers, MuS&lt;/P&gt;</description>
      <pubDate>Thu, 17 May 2018 04:19:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/how-to-index-a-json-file/m-p/402424#M71563</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2018-05-17T04:19:49Z</dc:date>
    </item>
    <item>
      <title>Re: how to index a json file  ?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/how-to-index-a-json-file/m-p/402425#M71564</link>
      <description>&lt;P&gt;But, looking at the screenshot this looks not too bad. What or where do you think it breaks or behaves badly?&lt;/P&gt;</description>
      <pubDate>Thu, 17 May 2018 04:21:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/how-to-index-a-json-file/m-p/402425#M71564</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2018-05-17T04:21:13Z</dc:date>
    </item>
    <item>
      <title>Re: how to index a json file  ?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/how-to-index-a-json-file/m-p/402426#M71565</link>
      <description>&lt;P&gt;I guess he/she wants it to be separate events, but the whole JSON is indexed as a single event. Right? &lt;/P&gt;</description>
      <pubDate>Thu, 17 May 2018 04:55:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/how-to-index-a-json-file/m-p/402426#M71565</guid>
      <dc:creator>xpac</dc:creator>
      <dc:date>2018-05-17T04:55:12Z</dc:date>
    </item>
    <item>
      <title>Re: how to index a json file  ?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/how-to-index-a-json-file/m-p/402427#M71566</link>
      <description>&lt;P&gt;If the JSON response is from REST API call then I can help you with rest_ta response handler script.&lt;/P&gt;</description>
      <pubDate>Thu, 17 May 2018 06:07:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/how-to-index-a-json-file/m-p/402427#M71566</guid>
      <dc:creator>ansif</dc:creator>
      <dc:date>2018-05-17T06:07:29Z</dc:date>
    </item>
    <item>
      <title>Re: how to index a json file  ?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/how-to-index-a-json-file/m-p/402428#M71567</link>
      <description>&lt;P&gt;i verified, the validator says json is valid, splunk is showing all records in one line with only one timestamp...i am expecting 4 lines&lt;/P&gt;

&lt;P&gt;is this a time format error ?&lt;/P&gt;</description>
      <pubDate>Thu, 17 May 2018 13:30:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/how-to-index-a-json-file/m-p/402428#M71567</guid>
      <dc:creator>abilis</dc:creator>
      <dc:date>2018-05-17T13:30:45Z</dc:date>
    </item>
    <item>
      <title>Re: how to index a json file  ?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/how-to-index-a-json-file/m-p/402429#M71568</link>
      <description>&lt;P&gt;the jason file is  stored locally in splunk server to index once&lt;/P&gt;</description>
      <pubDate>Thu, 17 May 2018 13:31:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/how-to-index-a-json-file/m-p/402429#M71568</guid>
      <dc:creator>abilis</dc:creator>
      <dc:date>2018-05-17T13:31:39Z</dc:date>
    </item>
    <item>
      <title>Re: how to index a json file  ?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/how-to-index-a-json-file/m-p/402430#M71569</link>
      <description>&lt;P&gt;yes, you are correct...i want separate events since they are at different times&lt;/P&gt;</description>
      <pubDate>Thu, 17 May 2018 13:42:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/how-to-index-a-json-file/m-p/402430#M71569</guid>
      <dc:creator>abilis</dc:creator>
      <dc:date>2018-05-17T13:42:57Z</dc:date>
    </item>
    <item>
      <title>Re: how to index a json file  ?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/how-to-index-a-json-file/m-p/402431#M71570</link>
      <description>&lt;P&gt;i found that splunk is not indexing separate events because the json file starts with { and ends with } if i removed those character splunk will give me a line per event.&lt;/P&gt;

&lt;P&gt;now the question is:  how can i remove the { at the beginning and the } at the end with splunk before indexing?&lt;/P&gt;

&lt;P&gt;thanks&lt;/P&gt;</description>
      <pubDate>Thu, 17 May 2018 19:37:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/how-to-index-a-json-file/m-p/402431#M71570</guid>
      <dc:creator>abilis</dc:creator>
      <dc:date>2018-05-17T19:37:22Z</dc:date>
    </item>
    <item>
      <title>Re: how to index a json file  ?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/how-to-index-a-json-file/m-p/402432#M71571</link>
      <description>&lt;P&gt;Hello. The pb is i the json file. Please remove the last comma of each record, and try again. For instance, based on your example :&lt;/P&gt;

&lt;HR /&gt;

&lt;PRE&gt;&lt;CODE&gt;{
    "records": [

        {
            "time": "2018-05-11T13:29:03Z",
            "GatewayId": "4r566-5678-4753-968f-34568",
            "Region": "unknown",
            "operationName": "ApplicationGatewayAccess",
            "category": "ApplicationGatewayAccessLog"
        },
        {
            "time": "2018-05-11T13:29:05Z",
            "GatewayId": "4r566-ae57-dfg543-968f-xxx45t67",
            "Region": "unknown",
            "operationName": "ApplicationGatewayAccess",
            "category": "ApplicationGatewayAccessLog"
        }
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 18 May 2018 08:49:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/how-to-index-a-json-file/m-p/402432#M71571</guid>
      <dc:creator>poete</dc:creator>
      <dc:date>2018-05-18T08:49:02Z</dc:date>
    </item>
    <item>
      <title>Re: how to index a json file  ?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/how-to-index-a-json-file/m-p/652285#M110747</link>
      <description>&lt;P&gt;Hi Have you found the answers to it. Even I am facing the same problem.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jul 2023 18:41:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/how-to-index-a-json-file/m-p/652285#M110747</guid>
      <dc:creator>krishnapriya</dc:creator>
      <dc:date>2023-07-27T18:41:47Z</dc:date>
    </item>
  </channel>
</rss>

