Splunk Search

How do you make fields into individual rows with each field value?

UMDTERPS
Communicator

I have a search that does the following:

 

| inputlookup system_scores.csv
| search "big search goes here"
| fields server_org both_server_desktop_score  desktop_score  server_score

 


The search gives me the following:

server_org    both_server_desktop_score     desktop_score        server_score
Bob                        60                                                       10                                     40
Alice                      40                                                       10                                     30
Jill                           10                                                        5                                        5

 

I would like to get each column into a row for each of the scores. My envision the search would look like this:

server_org                        server_type                                                         Score
Bob                                        both_server_desktop_score                       60
Bob                                        desktop_score                                                  10
Bob                                        server_score                                                     40         
Alice                                      both_server_desktop_score                       40
Alice                                      desktop_score                                                  10         
Alice                                      server_score                                                      30
Jill                                           both_server_desktop_score                      10
Jill                                           desktop_score                                                   5
Jill                                           server_score                                                       5

Is this possible?  Any ideas?

Labels (2)
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust
...
| eval server_type=mvappend("both_server_desktop_score", "desktop_score", "server_score")
| eval Score=mvappend(both_server_desktop_score, desktop_score, server_score)
| eval combined=mvzip(server_type, Score, "=")
| fields server_org, combined
| mvexpand combined
| rex field=combined "(?<server_type>[^=]*)=(?<Score>.*)"
| table server_org, server_type, Score
0 Karma
Get Updates on the Splunk Community!

Index This | Why did the turkey cross the road?

November 2025 Edition  Hayyy Splunk Education Enthusiasts and the Eternally Curious!   We’re back with this ...

Enter the Agentic Era with Splunk AI Assistant for SPL 1.4

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

Feel the Splunk Love: Real Stories from Real Customers

Hello Splunk Community,    What’s the best part of hearing how our customers use Splunk? Easy: the positive ...