Getting Data In

How do I strip the namespace of JSON fields?

ddrillic
Ultra Champion

Based on How to assign a field alias to a json field?

We ended up with large blocks as -

FIELDALIAS-alias0 = "apiRequest.reqInfo.clientID" AS clientID
FIELDALIAS-alias1 = "apiRequest.reqHeader.appContext" AS appContext
FIELDALIAS-alias2 = "apiRequest.reqHeader.dob" AS dob
FIELDALIAS-alias3 = "apiRequest.reqHeader.encryptedUserName" AS encryptedUserName
FIELDALIAS-alias4 = "apiRequest.reqHeader.firstName" AS firstName
FIELDALIAS-alias5 = "apiRequest.reqHeader.lastName" AS lastName
FIELDALIAS-alias6 = "apiRequest.reqHeader.memberId" AS memberId
....

Is there a way to strip the JSON namespace of the fields instead of aliasing each one of them as we do above?

0 Karma

ddrillic
Ultra Champion

Our sales engineer said -

Unfortunately, the FIELDALIAS stanza in props.conf cannot accept wildcards. You’d have to write a custom field extraction (though this is pretty trivial) and give-up the automatic field extractions Splunk performs on the JSON structure.

0 Karma

somesoni2
Revered Legend

ddrillic
Ultra Champion

Much appreciated @somesoni2 !!!

0 Karma

kamlesh_vaghela
SplunkTrust
SplunkTrust

@ddrillic

Can you please share some sample data?

0 Karma
Get Updates on the Splunk Community!

New This Month - Splunk Observability updates and improvements for faster ...

What’s New? This month, we’re delivering several enhancements across Splunk Observability Cloud for faster and ...

What's New in Splunk Cloud Platform 9.3.2411?

Hey Splunky People! We are excited to share the latest updates in Splunk Cloud Platform 9.3.2411. This release ...

Buttercup Games: Further Dashboarding Techniques (Part 6)

This series of blogs assumes you have already completed the Splunk Enterprise Search Tutorial as it uses the ...