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!

Updated Team Landing Page in Splunk Observability

We’re making some changes to the team landing page in Splunk Observability, based on your feedback. The ...

New! Splunk Observability Search Enhancements for Splunk APM Services/Traces and ...

Regardless of where you are in Splunk Observability, you can search for relevant APM targets including service ...

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...