<?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: Ingesting a Json format data in Splunk in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Ingesting-a-Json-format-data-in-Splunk/m-p/485332#M83071</link>
    <description>&lt;P&gt;@harsmarvania57  I have already tried it and as i said it creates a separate event with just a timestamp. I don't want that I want that whole thing in a single event because  I need that timestamp value in my report. I have attached s screenshot where you can see there are 2 separate events but that is actually a single event in the log file&lt;/P&gt;</description>
    <pubDate>Thu, 30 Apr 2020 16:02:14 GMT</pubDate>
    <dc:creator>Shashank_87</dc:creator>
    <dc:date>2020-04-30T16:02:14Z</dc:date>
    <item>
      <title>Ingesting a Json format data in Splunk</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Ingesting-a-Json-format-data-in-Splunk/m-p/485328#M83067</link>
      <description>&lt;P&gt;Hi, I am trying to upload a file with json formatted data like below but it's not coming properly. I tried using 2 ways -&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;When selecting sourcetype as automatic, it is creating a separate event for timestamp field.&lt;/LI&gt;
&lt;LI&gt;When selecting the sourcetype as _json, the timestamp is not even coming in the event.&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;Tue 21 Apr 14:16:26 BST 2020&lt;BR /&gt;
{"items":[{"cpu.load": "0.97","total.jvm.memory": "6039.798 MB","free.jvm.memory": "4466.046 MB","used.jvm.memory": "1573.752 MB","total.physical.system.memory": "16.656 GB","total.free.physical.system.memory": "3874.03 MB","total.used.physical.system.memory": "12.782 GB","number.of.cpus": "8"}]}&lt;/P&gt;

&lt;P&gt;Tue 21 Apr 14:16:36 BST 2020&lt;BR /&gt;
{"items":[{"cpu.load": "0.97","total.jvm.memory": "6039.798 MB","free.jvm.memory": "4456.382 MB","used.jvm.memory": "1583.415 MB","total.physical.system.memory": "16.656 GB","total.free.physical.system.memory": "3874.439 MB","total.used.physical.system.memory": "12.782 GB","number.of.cpus": "8"}]}&lt;/P&gt;

&lt;P&gt;Is there a way to ingest/upload this data properly?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Tue 21 Apr 14:16:26 BST 2020
{"items":[{"cpu.load": "0.97","total.jvm.memory": "6039.798 MB","free.jvm.memory": "4466.046 MB","used.jvm.memory": "1573.752 MB","total.physical.system.memory": "16.656 GB","total.free.physical.system.memory": "3874.03 MB","total.used.physical.system.memory": "12.782 GB","number.of.cpus": "8"}]}
Tue 21 Apr 14:16:36 BST 2020
{"items":[{"cpu.load": "0.97","total.jvm.memory": "6039.798 MB","free.jvm.memory": "4456.382 MB","used.jvm.memory": "1583.415 MB","total.physical.system.memory": "16.656 GB","total.free.physical.system.memory": "3874.439 MB","total.used.physical.system.memory": "12.782 GB","number.of.cpus": "8"}]}
Tue 21 Apr 14:16:46 BST 2020
{"items":[{"cpu.load": "0.84","total.jvm.memory": "6039.798 MB","free.jvm.memory": "4449.94 MB","used.jvm.memory": "1589.858 MB","total.physical.system.memory": "16.656 GB","total.free.physical.system.memory": "3867.042 MB","total.used.physical.system.memory": "12.789 GB","number.of.cpus": "8"}]}
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 30 Apr 2020 15:03:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Ingesting-a-Json-format-data-in-Splunk/m-p/485328#M83067</guid>
      <dc:creator>Shashank_87</dc:creator>
      <dc:date>2020-04-30T15:03:00Z</dc:date>
    </item>
    <item>
      <title>Re: Ingesting a Json format data in Splunk</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Ingesting-a-Json-format-data-in-Splunk/m-p/485329#M83068</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;Your rawdata contain timestamp &lt;CODE&gt;Tue 21 Apr 14:16:26 BST 2020&lt;/CODE&gt; and after that you have valid JSON, so you can't use _json sourcetype or INDEXED_EXTRACTIONS=json&lt;/P&gt;

&lt;P&gt;At search time you use regex and then spath to create/extract fields from json blob.&lt;/P&gt;

&lt;P&gt;Like&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your_base_query | rex field=_raw "(?&amp;lt;ext_json&amp;gt;{[^}]+}]})" | spath input=ext_json
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 30 Sep 2020 05:16:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Ingesting-a-Json-format-data-in-Splunk/m-p/485329#M83068</guid>
      <dc:creator>harsmarvania57</dc:creator>
      <dc:date>2020-09-30T05:16:07Z</dc:date>
    </item>
    <item>
      <title>Re: Ingesting a Json format data in Splunk</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Ingesting-a-Json-format-data-in-Splunk/m-p/485330#M83069</link>
      <description>&lt;P&gt;@harsmarvania57  Thanks for the response but how would i upload the data at first place? which sourcetype should i use? &lt;BR /&gt;
Because if i use automatic, the timestamp field comes as a separate event&lt;/P&gt;</description>
      <pubDate>Thu, 30 Apr 2020 15:21:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Ingesting-a-Json-format-data-in-Splunk/m-p/485330#M83069</guid>
      <dc:creator>Shashank_87</dc:creator>
      <dc:date>2020-04-30T15:21:15Z</dc:date>
    </item>
    <item>
      <title>Re: Ingesting a Json format data in Splunk</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Ingesting-a-Json-format-data-in-Splunk/m-p/485331#M83070</link>
      <description>&lt;P&gt;Create your own sourcetype Like app_json&lt;/P&gt;</description>
      <pubDate>Thu, 30 Apr 2020 15:55:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Ingesting-a-Json-format-data-in-Splunk/m-p/485331#M83070</guid>
      <dc:creator>harsmarvania57</dc:creator>
      <dc:date>2020-04-30T15:55:24Z</dc:date>
    </item>
    <item>
      <title>Re: Ingesting a Json format data in Splunk</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Ingesting-a-Json-format-data-in-Splunk/m-p/485332#M83071</link>
      <description>&lt;P&gt;@harsmarvania57  I have already tried it and as i said it creates a separate event with just a timestamp. I don't want that I want that whole thing in a single event because  I need that timestamp value in my report. I have attached s screenshot where you can see there are 2 separate events but that is actually a single event in the log file&lt;/P&gt;</description>
      <pubDate>Thu, 30 Apr 2020 16:02:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Ingesting-a-Json-format-data-in-Splunk/m-p/485332#M83071</guid>
      <dc:creator>Shashank_87</dc:creator>
      <dc:date>2020-04-30T16:02:14Z</dc:date>
    </item>
    <item>
      <title>Re: Ingesting a Json format data in Splunk</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Ingesting-a-Json-format-data-in-Splunk/m-p/485333#M83072</link>
      <description>&lt;P&gt;I can’t see any screenshot, also please provide your raw data in code format(Use 101010 button)&lt;/P&gt;</description>
      <pubDate>Thu, 30 Apr 2020 16:04:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Ingesting-a-Json-format-data-in-Splunk/m-p/485333#M83072</guid>
      <dc:creator>harsmarvania57</dc:creator>
      <dc:date>2020-04-30T16:04:52Z</dc:date>
    </item>
    <item>
      <title>Re: Ingesting a Json format data in Splunk</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Ingesting-a-Json-format-data-in-Splunk/m-p/485334#M83073</link>
      <description>&lt;P&gt;@harsmarvania57  added&lt;/P&gt;</description>
      <pubDate>Thu, 30 Apr 2020 16:11:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Ingesting-a-Json-format-data-in-Splunk/m-p/485334#M83073</guid>
      <dc:creator>Shashank_87</dc:creator>
      <dc:date>2020-04-30T16:11:12Z</dc:date>
    </item>
    <item>
      <title>Re: Ingesting a Json format data in Splunk</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Ingesting-a-Json-format-data-in-Splunk/m-p/485335#M83074</link>
      <description>&lt;P&gt;Based on data you have provided I have created below sourcetype on Indexer, if you are ingesting data via Heavy Forwarder then you need to create below props.conf on Heavy Forwarder.&lt;/P&gt;

&lt;P&gt;props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[test_st]
LINE_BREAKER = }([\r\n]+)
MAX_TIMESTAMP_LOOKAHEAD = 28
SHOULD_LINEMERGE = false
TIME_FORMAT = %a %d %b %H:%M:%S %Z %Y
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And then used search query which I have provided and it is extracting data.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Apr 2020 17:21:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Ingesting-a-Json-format-data-in-Splunk/m-p/485335#M83074</guid>
      <dc:creator>harsmarvania57</dc:creator>
      <dc:date>2020-04-30T17:21:37Z</dc:date>
    </item>
    <item>
      <title>Re: Ingesting a Json format data in Splunk</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Ingesting-a-Json-format-data-in-Splunk/m-p/485336#M83075</link>
      <description>&lt;P&gt;@harsmarvania57 That actually worked. Thank you. I am getting time time and the json in same event  though the _time field has not been extracted. How do i extract the time because I have to plot the graph based on time.&lt;/P&gt;</description>
      <pubDate>Fri, 01 May 2020 10:40:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Ingesting-a-Json-format-data-in-Splunk/m-p/485336#M83075</guid>
      <dc:creator>Shashank_87</dc:creator>
      <dc:date>2020-05-01T10:40:48Z</dc:date>
    </item>
    <item>
      <title>Re: Ingesting a Json format data in Splunk</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Ingesting-a-Json-format-data-in-Splunk/m-p/485337#M83076</link>
      <description>&lt;P&gt;I can see time from raw data in _time, see screenshot from my lab instance &lt;A href="https://imgur.com/a/bW5T8ok"&gt;https://imgur.com/a/bW5T8ok&lt;/A&gt; &lt;/P&gt;

&lt;P&gt;How are you ingesting data ?&lt;/P&gt;</description>
      <pubDate>Fri, 01 May 2020 11:05:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Ingesting-a-Json-format-data-in-Splunk/m-p/485337#M83076</guid>
      <dc:creator>harsmarvania57</dc:creator>
      <dc:date>2020-05-01T11:05:26Z</dc:date>
    </item>
  </channel>
</rss>

