Getting Data In

Receiving JSON files from Azure containing multiple events in each file. How do I break these into unique events?

DJAXX03
New Member

I am pulling in JSON files into Splunk from Microsoft Azure. Each JSON files contains multiple events and time stamps.

Below is an example of a JSON file that is being pulled in. When I look into Splunk, I get a single event with 3 different entries for each field extraction listed.

I would like to get 3 different events based on the eventTimestamp and data for each event.
Is there a way to do this on the Universal Forwarder or in props.conf?
If so, could someone provide some guidance.

Note: I have the sourcetype = _json in the inputs.conf on the universal forwarder pulling this information.

{
  "Records": [
    {
      "authorization": {
        "action": "Microsoft.Authorization/roleAssignments/write",
        "scope": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/default/providers/Microsoft.Network/virtualNetworks/network1/subnets/subnet1/providers/Microsoft.Authorization/roleAssignments/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
      },

      "eventTimestamp": "2017-01-05T22:17:19.4925915Z",
      "submissionTimestamp": "2017-01-05T22:17:40.0170745Z",
      "subscriptionId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
      "tenantId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
    },

   {
      "authorization": {
        "action": "Microsoft.Authorization/roleAssignments/write",
        "scope": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/default/providers/Microsoft.Network/virtualNetworks/network1/subnets/subnet1/providers/Microsoft.Authorization/roleAssignments/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
      },

      "eventTimestamp": "2017-01-05T22:17:20.4925915Z",
      "submissionTimestamp": "2017-01-05T22:17:40.0170745Z",
      "subscriptionId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
      "tenantId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
    },

    {
      "authorization": {
        "action": "Microsoft.Authorization/roleAssignments/write",
        "scope": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/default/providers/Microsoft.Network/virtualNetworks/network1/subnets/subnet1/providers/Microsoft.Authorization/roleAssignments/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"

      },
      "eventTimestamp": "2017-01-05T22:17:22.9768133Z",
      "submissionTimestamp": "2017-01-05T22:17:40.0141995Z",
      "subscriptionId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
      "tenantId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"

}
  ]
}
0 Karma

aaraneta_splunk
Splunk Employee
Splunk Employee

@DJAXX03 - Were you able to test out jkat54 solution? Did it work? If yes, please don't forget to resolve this post by clicking on "Accept". If you still need more help, please provide a comment with some feedback. Thanks!

0 Karma

jkat54
SplunkTrust
SplunkTrust

You can use spath command but I'd recommend the Splunk Technology Addon for Azure first if you're not already using it.

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Tech Talk Recap | Mastering Threat Hunting

Mastering Threat HuntingDive into the world of threat hunting, exploring the key differences between ...

Observability for AI Applications: Troubleshooting Latency

If you’re working with proprietary company data, you’re probably going to have a locally hosted LLM or many ...

Splunk AI Assistant for SPL vs. ChatGPT: Which One is Better?

In the age of AI, every tool promises to make our lives easier. From summarizing content to writing code, ...