Splunk Search

How to create the below view?

abhi04
Communicator

I have a below query:

index="auto_prod_cm_comparisions" sourcetype="auto_prod_details_log" source="/logs/web/output/iwarranty/" "/apps/web/sfw/java/" | search NOT Server_Name=*wb | chart values(Java_Version) over Java_Version by Server_Name

The above query view shows as below

Java_Version -------sat1svmap179.....sat1svmap180.....sat1svmap171....sat1svmap172

jdk170_151--------------..............................jdk170_151................................... jdk170_151

jdk170_171.............. jdk170_171 ........................................jdk170_171

I want the view to be as below,how to do that?

Java_Version -----------------------sat1svmap179.....sat1svmap180.....sat1svmap171....sat1svmap172
jdk170_151 jdk170_171-----------jdk170_171--------jdk170_151------------jdk170_171-----jdk170_151

Tags (1)
0 Karma

HiroshiSatoh
Champion

Do you want to display on a single line?

(your search)|stats values(*) as *
0 Karma

abhi04
Communicator

@HiroshiSatoh,

The above worked, but now the ordering of columns have changed with Java_Version column now came at the middle. Of what I y=understand after the command "|stats values(*) as *" it has arranged the columns alphabetically. How to rearrange it back to the previous order?

0 Karma

FrankVl
Ultra Champion

You can use the | table field1,field2,... command to order the fields as you desire.

0 Karma

abhi04
Communicator

@HiroshiSatoh

yes I need in a single line. Above query works for the servers and not under the java_version

0 Karma

FrankVl
Ultra Champion

What exactly do you mean that it doesn't work for the Java_Version field? You mean the multiple values in the field are displayed below each other? That's because it is a multi valued field.

You can combine that into a single value by using | eval Java_Version = mvjoin(Java_Version, " ")

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...