Splunk Search

How do I rename a nested field?

stong2351
New Member

I have an eval query.

The details object returned looks like this:
{
status: 404,
code: ERROR
}


"details.status"=404 | eval detailsStatus=details.status | table detailsStatus

detailsStatus never has a value in the table though. What am I doing wrong?

Tags (3)
0 Karma

kjvarga
Observer

Using eval and single quotes worked for me, for example: 

namespace="production" container_name="payment-service" type="event" data.event="setup_intent.setup_failed" | eval userId = 'data.event_data.data.object.metadata.user_id' | table userId
0 Karma

richgalloway
SplunkTrust
SplunkTrust

I've done that before, but don't recall if I used |eval detailsStatus = "details.status", | eval detailsStatus = 'details.status', or | rename "details.stats" as detailsStatus. Perhaps one of them will work for you.

---
If this reply helps you, Karma would be appreciated.
0 Karma
Get Updates on the Splunk Community!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...