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!

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer Certification at ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

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