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!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...