<?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 How to configure Splunk to parse and index JSON data in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-Splunk-to-parse-and-index-JSON-data/m-p/464728#M80157</link>
    <description>&lt;P&gt;I got a custom-crafted JSON file that holds a mix of data types within. I'm a newbie with Splunk administration so bear with me.&lt;/P&gt;

&lt;P&gt;This is a valid JSON, as far as I understand I need to define a new link break definition with regex to help Splunk parse and index this data correctly with all fields. I minified the file and uploaded it after verifying that my regex actually match:&lt;/P&gt;

&lt;P&gt;&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/8347iF7608DA9FD3DBBB8/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;Can you assist what could be a good regex definition? Below is a snippet from file I want to parse; there should be 2 events in there:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;{"data":[{"serial":[0],"_score":null,"_type":"winevtx","_index":"xxx","_id":"xxx","_source":{"process_id":48,"message":"","provider_guid":"xxx","log_name":"Security","source_name":"Microsoft-Windows-Security-Auditing","event_data":{"TicketOptions":"xxx","TargetUserName":"xxx","ServiceName":"krbtgt","IpAddress":"::ffff:","TargetDomainName":"xxx","IpPort":"53782","TicketEncryptionType":"0x12","LogonGuid":"xxx","TransmittedServices":"-","Status":"0x0","ServiceSid":"xxx"},"beat":{"name":"xxx","version":"5.2.2","hostname":"xxx"},"thread_id":1016,"@version":"1","@metadata":{"index_local_timestamp":"2019-07-20T06:27:21.23323","hostname":"xxxDC","index_utc_timestamp":"2019-07-20T06:27:21.23323","timezone":"UTC+0000"},"opcode":"Info","@timestamp":"2019-07-20T06:25:33.801Z","tags":["beats_input_codec_plain_applied"],"type":"wineventlog","computer_name":"xxx","event_id":4769,"record_number":"198","level":"Information","keywords":["Audit Success"],"host":"xxx","task":"Kerberos Service Ticket Operations"}},{"serial":[1],"_score":null,"_type":"winevtx","_index":"xxx-xxx","_id":"==","_source":{"event_data":{"SubjectDomainName":"-","LogonType":"3","LogonGuid":"{xxx}","SubjectUserSid":"S-1-0-0","LogonProcessName":"Kerberos","TargetDomainName":"xxx","AuthenticationPackageName":"Kerberos","ProcessName":"-","SubjectLogonId":"0x0","TargetUserName":"xxx","ProcessId":"0x0","TargetLogonId":"","IpAddress":"::1","LmPackageName":"-","ImpersonationLevel":"%%1833","IpPort":"0","SubjectUserName":"-","TargetUserSid":"S-1-5-18","KeyLength":"0","TransmittedServices":"-"},"provider_guid":"{xxx}","beat":{"name":"xxx","version":"5.2.2","hostname":"xxx"},"@metadata":{"index_local_timestamp":"2019-07-20T06:34:21.23323","hostname":"xxx","index_utc_timestamp":"2019-07-20T06:34:21.23323","timezone":"UTC+0000"},"opcode":"Info","@timestamp":"2019-07-20T06:33:40.262Z","thread_id":52,"event_id":4624,"record_number":"123","level":"Information","log_name":"Security","source_name":"Microsoft-Windows-Security-Auditing","@version":"1","process_id":48,"host":"xxx","type":"wineventlog","computer_name":"xxx","version":1,"tags":["beats_input_codec_plain_applied"],"keywords":["Audit Success"],"task":"Logon","message":""}}]}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Berry&lt;/P&gt;</description>
    <pubDate>Mon, 10 Feb 2020 18:10:09 GMT</pubDate>
    <dc:creator>berryk</dc:creator>
    <dc:date>2020-02-10T18:10:09Z</dc:date>
    <item>
      <title>How to configure Splunk to parse and index JSON data</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-Splunk-to-parse-and-index-JSON-data/m-p/464728#M80157</link>
      <description>&lt;P&gt;I got a custom-crafted JSON file that holds a mix of data types within. I'm a newbie with Splunk administration so bear with me.&lt;/P&gt;

&lt;P&gt;This is a valid JSON, as far as I understand I need to define a new link break definition with regex to help Splunk parse and index this data correctly with all fields. I minified the file and uploaded it after verifying that my regex actually match:&lt;/P&gt;

&lt;P&gt;&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/8347iF7608DA9FD3DBBB8/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;Can you assist what could be a good regex definition? Below is a snippet from file I want to parse; there should be 2 events in there:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;{"data":[{"serial":[0],"_score":null,"_type":"winevtx","_index":"xxx","_id":"xxx","_source":{"process_id":48,"message":"","provider_guid":"xxx","log_name":"Security","source_name":"Microsoft-Windows-Security-Auditing","event_data":{"TicketOptions":"xxx","TargetUserName":"xxx","ServiceName":"krbtgt","IpAddress":"::ffff:","TargetDomainName":"xxx","IpPort":"53782","TicketEncryptionType":"0x12","LogonGuid":"xxx","TransmittedServices":"-","Status":"0x0","ServiceSid":"xxx"},"beat":{"name":"xxx","version":"5.2.2","hostname":"xxx"},"thread_id":1016,"@version":"1","@metadata":{"index_local_timestamp":"2019-07-20T06:27:21.23323","hostname":"xxxDC","index_utc_timestamp":"2019-07-20T06:27:21.23323","timezone":"UTC+0000"},"opcode":"Info","@timestamp":"2019-07-20T06:25:33.801Z","tags":["beats_input_codec_plain_applied"],"type":"wineventlog","computer_name":"xxx","event_id":4769,"record_number":"198","level":"Information","keywords":["Audit Success"],"host":"xxx","task":"Kerberos Service Ticket Operations"}},{"serial":[1],"_score":null,"_type":"winevtx","_index":"xxx-xxx","_id":"==","_source":{"event_data":{"SubjectDomainName":"-","LogonType":"3","LogonGuid":"{xxx}","SubjectUserSid":"S-1-0-0","LogonProcessName":"Kerberos","TargetDomainName":"xxx","AuthenticationPackageName":"Kerberos","ProcessName":"-","SubjectLogonId":"0x0","TargetUserName":"xxx","ProcessId":"0x0","TargetLogonId":"","IpAddress":"::1","LmPackageName":"-","ImpersonationLevel":"%%1833","IpPort":"0","SubjectUserName":"-","TargetUserSid":"S-1-5-18","KeyLength":"0","TransmittedServices":"-"},"provider_guid":"{xxx}","beat":{"name":"xxx","version":"5.2.2","hostname":"xxx"},"@metadata":{"index_local_timestamp":"2019-07-20T06:34:21.23323","hostname":"xxx","index_utc_timestamp":"2019-07-20T06:34:21.23323","timezone":"UTC+0000"},"opcode":"Info","@timestamp":"2019-07-20T06:33:40.262Z","thread_id":52,"event_id":4624,"record_number":"123","level":"Information","log_name":"Security","source_name":"Microsoft-Windows-Security-Auditing","@version":"1","process_id":48,"host":"xxx","type":"wineventlog","computer_name":"xxx","version":1,"tags":["beats_input_codec_plain_applied"],"keywords":["Audit Success"],"task":"Logon","message":""}}]}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Berry&lt;/P&gt;</description>
      <pubDate>Mon, 10 Feb 2020 18:10:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-Splunk-to-parse-and-index-JSON-data/m-p/464728#M80157</guid>
      <dc:creator>berryk</dc:creator>
      <dc:date>2020-02-10T18:10:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure Splunk to parse and index JSON data</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-Splunk-to-parse-and-index-JSON-data/m-p/464729#M80158</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;|makeresults
|eval _raw="{\"data\":[{\"serial\":[0],\"_score\":null,\"_type\":\"winevtx\",\"_index\":\"xxx\",\"_id\":\"xxx\",\"_source\":{\"process_id\":48,\"message\":\"\",\"provider_guid\":\"xxx\",\"log_name\":\"Security\",\"source_name\":\"Microsoft-Windows-Security-Auditing\",\"event_data\":{\"TicketOptions\":\"xxx\",\"TargetUserName\":\"xxx\",\"ServiceName\":\"krbtgt\",\"IpAddress\":\"::ffff:\",\"TargetDomainName\":\"xxx\",\"IpPort\":\"53782\",\"TicketEncryptionType\":\"0x12\",\"LogonGuid\":\"xxx\",\"TransmittedServices\":\"-\",\"Status\":\"0x0\",\"ServiceSid\":\"xxx\"},\"beat\":{\"name\":\"xxx\",\"version\":\"5.2.2\",\"hostname\":\"xxx\"},\"thread_id\":1016,\"@version\":\"1\",\"@metadata\":{\"index_local_timestamp\":\"2019-07-20T06:27:21.23323\",\"hostname\":\"xxxDC\",\"index_utc_timestamp\":\"2019-07-20T06:27:21.23323\",\"timezone\":\"UTC+0000\"},\"opcode\":\"Info\",\"@timestamp\":\"2019-07-20T06:25:33.801Z\",\"tags\":[\"beats_input_codec_plain_applied\"],\"type\":\"wineventlog\",\"computer_name\":\"xxx\",\"event_id\":4769,\"record_number\":\"198\",\"level\":\"Information\",\"keywords\":[\"Audit Success\"],\"host\":\"xxx\",\"task\":\"Kerberos Service Ticket Operations\"}},{\"serial\":[1],\"_score\":null,\"_type\":\"winevtx\",\"_index\":\"xxx-xxx\",\"_id\":\"==\",\"_source\":{\"event_data\":{\"SubjectDomainName\":\"-\",\"LogonType\":\"3\",\"LogonGuid\":\"{xxx}\",\"SubjectUserSid\":\"S-1-0-0\",\"LogonProcessName\":\"Kerberos\",\"TargetDomainName\":\"xxx\",\"AuthenticationPackageName\":\"Kerberos\",\"ProcessName\":\"-\",\"SubjectLogonId\":\"0x0\",\"TargetUserName\":\"xxx\",\"ProcessId\":\"0x0\",\"TargetLogonId\":\"\",\"IpAddress\":\"::1\",\"LmPackageName\":\"-\",\"ImpersonationLevel\":\"%%1833\",\"IpPort\":\"0\",\"SubjectUserName\":\"-\",\"TargetUserSid\":\"S-1-5-18\",\"KeyLength\":\"0\",\"TransmittedServices\":\"-\"},\"provider_guid\":\"{xxx}\",\"beat\":{\"name\":\"xxx\",\"version\":\"5.2.2\",\"hostname\":\"xxx\"},\"@metadata\":{\"index_local_timestamp\":\"2019-07-20T06:34:21.23323\",\"hostname\":\"xxx\",\"index_utc_timestamp\":\"2019-07-20T06:34:21.23323\",\"timezone\":\"UTC+0000\"},\"opcode\":\"Info\",\"@timestamp\":\"2019-07    -20T06:33:40.262Z\",\"thread_id\":52,\"event_id\":4624,\"record_number\":\"123\",\"level\":\"Information\",\"log_name\":\"Security\",\"source_name\":\"Microsoft-Windows-Security-Auditing\",\"@version\":\"1\",\"process_id\":48,\"host\":\"xxx\",\"type\":\"wineventlog\",\"computer_name\":\"xxx\",\"version\":1,\"tags\":[\"beats_input_codec_plain_applied\"],\"keywords\":[\"Audit Success\"],\"task\":\"Logon\",\"message\":\"\"}}]}"
| spath
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;EM&gt;props.conf&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Feb 2020 20:33:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-Splunk-to-parse-and-index-JSON-data/m-p/464729#M80158</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-02-10T20:33:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure Splunk to parse and index JSON data</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-Splunk-to-parse-and-index-JSON-data/m-p/464730#M80159</link>
      <description>&lt;P&gt;Thanks for that. But I'm looking for parsing during index. I've imported the json and now need to parse it somehow so Splunk could digest it correctly. &lt;BR /&gt;
what I attached here is just a small snippet for example&lt;/P&gt;</description>
      <pubDate>Mon, 10 Feb 2020 21:04:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-Splunk-to-parse-and-index-JSON-data/m-p/464730#M80159</guid>
      <dc:creator>berryk</dc:creator>
      <dc:date>2020-02-10T21:04:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure Splunk to parse and index JSON data</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-Splunk-to-parse-and-index-JSON-data/m-p/464731#M80160</link>
      <description>&lt;P&gt;&lt;EM&gt;props.conf&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Feb 2020 21:57:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-Splunk-to-parse-and-index-JSON-data/m-p/464731#M80160</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-02-10T21:57:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure Splunk to parse and index JSON data</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-Splunk-to-parse-and-index-JSON-data/m-p/464732#M80161</link>
      <description>&lt;P&gt;I'll try to be more precise - I know that I need to configure props.conf (or the sourcetype during data import) but not sure how - what is the right regex syntax? in the example above there are 2 distinct events. When I chose json as sourcetype the data is not shown as expected (not all fields are parsed), probably because of the "serial" array.  I read few questions but none was the same case as I have here&lt;/P&gt;

&lt;P&gt;Berry &lt;/P&gt;</description>
      <pubDate>Mon, 10 Feb 2020 22:06:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-Splunk-to-parse-and-index-JSON-data/m-p/464732#M80161</guid>
      <dc:creator>berryk</dc:creator>
      <dc:date>2020-02-10T22:06:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure Splunk to parse and index JSON data</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-Splunk-to-parse-and-index-JSON-data/m-p/464733#M80162</link>
      <description>&lt;P&gt;You can use the below sourcetype. (Or the default pretrained "json" sourcetype)&lt;/P&gt;

&lt;P&gt;[data_json]&lt;BR /&gt;
pulldown_type = true&lt;BR /&gt;
INDEXED_EXTRACTIONS = json&lt;BR /&gt;
KV_MODE = none&lt;BR /&gt;
category = Structured&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 04:04:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-Splunk-to-parse-and-index-JSON-data/m-p/464733#M80162</guid>
      <dc:creator>jhomerlopez</dc:creator>
      <dc:date>2020-09-30T04:04:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure Splunk to parse and index JSON data</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-Splunk-to-parse-and-index-JSON-data/m-p/464734#M80163</link>
      <description>&lt;P&gt;answer&lt;BR /&gt;
Thanks mate.&lt;BR /&gt;
I tried to use the default json sourcetype with no success. Seems like something else should be used to help Splunk digest it. I believe I need to configure the break liner but not sure what the value should be. Any ideas?&lt;/P&gt;</description>
      <pubDate>Tue, 11 Feb 2020 07:01:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-Splunk-to-parse-and-index-JSON-data/m-p/464734#M80163</guid>
      <dc:creator>berryk</dc:creator>
      <dc:date>2020-02-11T07:01:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure Splunk to parse and index JSON data</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-Splunk-to-parse-and-index-JSON-data/m-p/464735#M80164</link>
      <description>&lt;P&gt;Just edited my question, hope it's more clear now&lt;/P&gt;</description>
      <pubDate>Tue, 11 Feb 2020 13:31:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-Splunk-to-parse-and-index-JSON-data/m-p/464735#M80164</guid>
      <dc:creator>berryk</dc:creator>
      <dc:date>2020-02-11T13:31:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure Splunk to parse and index JSON data</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-Splunk-to-parse-and-index-JSON-data/m-p/464736#M80165</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;KV_MODE = json
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;your question is corrected and &lt;CODE&gt;spath&lt;/CODE&gt;works fine, basically this setting is work.&lt;BR /&gt;
If you modify conf, you must restart splunk.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Feb 2020 21:05:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-Splunk-to-parse-and-index-JSON-data/m-p/464736#M80165</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-02-11T21:05:53Z</dc:date>
    </item>
  </channel>
</rss>

