Splunk Search

eval condition help on manipulating a field which has multiple field values?

pavanae
Builder

I have an eval condition in my query as follows

My_query | eval object=host." (".id.")"  | table host object

which gives me the null values on the object field as follows

host    object
abc

And reason for empty values in object field is that the id field has more than one value.

Now, how can display the object field values in case of multiple values for id field?

0 Karma
1 Solution

solarboyz1
Builder

You could try the following:

Your_Query 
| mvexpand id
| eval object=host." (".id.")"  
| table host object

mvexpand expands the values of a multivalue field into separate events, one event for each value in the multivalue field.

View solution in original post

solarboyz1
Builder

You could try the following:

Your_Query 
| mvexpand id
| eval object=host." (".id.")"  
| table host object

mvexpand expands the values of a multivalue field into separate events, one event for each value in the multivalue field.

Get Updates on the Splunk Community!

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...