Dashboards & Visualizations

json extraction for larger events

kranthimutyala2
Engager

Hi Team, I have the below JSON field in the splunk event

[{"sourceAccountId":"sourceAccountId_1","Remarks":"Successfully Migrated","recordStatus":"Success","RecordID":"RecordID_1","destinationAccountId":"destinationAccountId_1","defaultOwnerId":"defaultOwnerId_1"},{"sourceAccountId":"sourceAccountId_1","Remarks":"Successfully Migrated","recordStatus":"Success","RecordID":"RecordID_2","destinationAccountId":"destinationAccountId_1","defaultOwnerId":"defaultOwnerId_1"},{"sourceAccountId":"sourceAccountId_1","Remarks":"Successfully Migrated","recordStatus":"Success","RecordID":"RecordID_3","destinationAccountId":"destinationAccountId_1","defaultOwnerId":"defaultOwnerId_1"}]

 just for eg: I have added 3 entries but In real we have more than 200 records in the single event in this field
When im using spath to extract this data its giving blank results, the same data when tested with fewer records (<10) its able to extract all the key value pairs, is there a better way to extract from large event data ??
Please help me with the SPL query.Thanks

 @yuanliu @gcusello 

Labels (3)
0 Karma

sainag_splunk
Splunk Employee
Splunk Employee

I believe you are hitting the limit of extraction_cutoff for spath, maybe. If this is not working, try to set up KV_MODE=JSON on the search head as an alternative for that particular source or sourcetype if you don't have a lot of data coming in.

https://docs.splunk.com/Documentation/Splunk/latest/Admin/limitsconf

extraction_cutoff = <integer>
* For 'extract-all' spath extraction mode, this setting applies extraction only
  to the first <integer> number of bytes. This setting applies both the auto kv
  extraction and the spath command, when explicitly extracting fields.
* Default: 5000

 

If this helps, Upvote!!!!
Together we make the Splunk Community stronger 
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

@kranthimutyala2 I am a volunteer here, as are most of those providing answers. Please don't tag me in your posts. If I have time and have something to contribute, I will try to help. But I will choose which posts to answer and when.

0 Karma

kranthimutyala2
Engager

Sure np, I have untagged you and wont tag going forward

0 Karma
Get Updates on the Splunk Community!

Splunk Mobile: Your Brand-New Home Screen

Meet Your New Mobile Hub  Hello Splunk Community!  Staying connected to your data—no matter where you are—is ...

Introducing Value Insights (Beta): Understand the Business Impact your organization ...

Real progress on your strategic priorities starts with knowing the business outcomes your teams are delivering ...

Enterprise Security (ES) Essentials 8.3 is Now GA — Smarter Detections, Faster ...

As of today, Enterprise Security (ES) Essentials 8.3 is now generally available, helping SOC teams simplify ...