Splunk Search

order changing with the table command ??

rakesh_498115
Motivator

Hi.

When i am using the table command ? i am not getting the fields in the order i have ginen ??
how can i do it be in the same order which i have mentioned ??

my query is :

soucetype="mydata" | table _raw,Recieved,Sent

i want this order of display . but i am gettin in Received,Sent,_raw in this order ..pls help..i want the same order mentiond with the table commmand ..

Tags (1)
0 Karma
1 Solution

MuS
SplunkTrust
SplunkTrust

Hi

it took me some reading the docs and trying out of some commands and I got what you are looking for 😉

the easiest way is to rename _raw to anything and use the new field name in the table:

 soucetype="mydata" | rename _raw as newraw | table newraw, Recieved, Sent

there are probably more effective ways of doing this, but it worked for example you provided and it answers your question.

cheers,

MuS

View solution in original post

arihant16cse
Path Finder

| table Receive,sent,_raw

0 Karma

rajeev_ku
Path Finder

Best way to do it as below
soucetype="mydata" | rename _raw as newraw | table Recieved, Sent, newraw
it will adjust raw data at most right position.

0 Karma

MuS
SplunkTrust
SplunkTrust

Hi

it took me some reading the docs and trying out of some commands and I got what you are looking for 😉

the easiest way is to rename _raw to anything and use the new field name in the table:

 soucetype="mydata" | rename _raw as newraw | table newraw, Recieved, Sent

there are probably more effective ways of doing this, but it worked for example you provided and it answers your question.

cheers,

MuS

rakesh_498115
Motivator

Thans Mus .. i got it now ..:)

0 Karma

MuS
SplunkTrust
SplunkTrust

rakesh, sorry but I hope you are aware that you can scroll a windows not only up and down but also to the left or to the right? _raw is usually very long, therefore received and sent are WAY ON THE RIGHT of your screen.

0 Karma

rakesh_498115
Motivator

Hi MuS,

when i am used like this..i am getting the newraw values alone...Received , Sent are not at all displayin ..pls help..

0 Karma

Ayn
Legend

Use fields.

fields _raw,Received,Sent
0 Karma

rakesh_498115
Motivator

fields command is not working like this .... 😞

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 ...