Getting Data In

JSON input: How can I split these values for each line break a new row is generated?

wes7bb
New Member

alt text

Hi there,
I have a JSON input in Splunk and Splunk extracts the data. But it is not generating for each application in my case WCMS or ESIWEB as their own entry that is possible to sort through this data. All this information is related to one event.

How can I split these values?
I want that for each line break a new row is generated.

Thanks a lot in advance!

Yours
Sina

Tags (2)
0 Karma
1 Solution

kamlesh_vaghela
SplunkTrust
SplunkTrust

@wes7bb ,

Can you please try this?

YOUR_SEARCH
| rename 'data{}.application.name' as 'application_name', 'data{}.package.name' as 'package_name', 'data{}.planned_from' as 'planned_from'
| eval tempField= mvzip(mvzip(application_name,package_name),planned_from) 
| stats count by tempField
| eval application_name = mvindex(split(tempField,","),0), package_name= mvindex(split(tempField,","),1), planned_from=mvindex(split(tempField,","),2) 
| table application_name package_name planned_from

Thanks

View solution in original post

0 Karma

kamlesh_vaghela
SplunkTrust
SplunkTrust

@wes7bb ,

Can you please try this?

YOUR_SEARCH
| rename 'data{}.application.name' as 'application_name', 'data{}.package.name' as 'package_name', 'data{}.planned_from' as 'planned_from'
| eval tempField= mvzip(mvzip(application_name,package_name),planned_from) 
| stats count by tempField
| eval application_name = mvindex(split(tempField,","),0), package_name= mvindex(split(tempField,","),1), planned_from=mvindex(split(tempField,","),2) 
| table application_name package_name planned_from

Thanks

0 Karma

wes7bb
New Member

Thanks a lot for your help! It works!

0 Karma
Get Updates on the Splunk Community!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer Certification at ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...