Getting Data In

Help extracting json at index time

olegr
Engager

Hello,

I have a scripted input that runs a py script which returns json in this format in a single line:

 

 

[
    {
        "address": "blah@blah.com",
        "timeRanges":
        [
            {
                "start": "2023-05-22T12:59:00.000Z",
                "end": "2023-05-25T13:48:19.000Z",
            },
            {
                "start": "2023-06-12T04:06:56.000Z",
            }
        ],
    },
    {
        "address": "blah1@blah1.com",
        "timeRanges":
        [
            {
                "start": "2023-07-01T15:00:00.000Z",
                "end": "2023-07-05T04:38:08.000Z",
            }
        ],
   }
]

 

 

 

Splunk indexes everything as a single record as below.

olegr_0-1689026255162.png

Looking for a way to extract each object into its own record.  When I import the file via the GUI, it parses it correctly, but not via the scripted input.  Props:

[my-source-type]
NO_BINARY_CHECK = true
INDEXED_EXTRACTIONS = json
KV_MODE = none
SHOULD_LINEMERGE = true
TRUNCATE = 0

 

 

Labels (1)
0 Karma
Get Updates on the Splunk Community!

Earn a $35 Gift Card for Answering our Splunk Admins & App Developer Survey

Survey for Splunk Admins and App Developers is open now! | Earn a $35 gift card!      Hello there,  Splunk ...

Continuing Innovation & New Integrations Unlock Full Stack Observability For Your ...

You’ve probably heard the latest about AppDynamics joining the Splunk Observability portfolio, deepening our ...

Monitoring Amazon Elastic Kubernetes Service (EKS)

As we’ve seen, integrating Kubernetes environments with Splunk Observability Cloud is a quick and easy way to ...