Splunk Search

Display a single value from multyple value filed in the table.

bigll
Path Finder

I have filed "Labels" with multiple value in the single filed.
I need to see only OS value red hat(linux) or windows 2019
I  tried eval in SPL but as a result I gut eather first value or empty cell.

Thank you.

Please see eval statement and sample data below.
--------
| eval Labels= split (Labels, " ")
------------------------------

Sample data before eval

development
red hat(linux)
main_ucmdb

or

contingency
production
red hat(linux)
main_ucmdb

or 
production
windows 2019
wintel server
microsoft windows server 2019 standard
main_ucmdb

Labels (3)
Tags (1)
0 Karma

PickleRick
SplunkTrust
SplunkTrust

And how do you decide which label is the one you want? Your examples aren'r consistent here in term of the label order.

Get Updates on the Splunk Community!

Enter the Agentic Era with Splunk AI Assistant for SPL 1.4

  🚀 Your data just got a serious AI upgrade — are you ready? Say hello to the Agentic Era with the ...

Stronger Security with Federated Search for S3, GCP SQL & Australian Threat ...

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Accelerating Observability as Code with the Splunk AI Assistant

We’ve seen in previous posts what Observability as Code (OaC) is and how it’s now essential for managing ...