Splunk Search

How to change column order created by chart

halloweening
New Member

I create a search:

...my search...
| chart values(duration) over TimeGap by Process

The table shows duration used by each process at specific time gap (t1,t2,t3..). It looks like:

TimeGap P3 P4 P1 P5 P2
t1
t2
t3
...

The column names (Pn) which are string-formatted field created by rex command mean different processes; they are sorted alphabetically with the chart command. How can I sort the Process by a specific sequence as P1 P2 P3 P4 P5?

Tags (3)
0 Karma

woodcock
Esteemed Legend

If you are searching for alphabetical, just add this to the bottom:

... | table _* *

If you need a particular order, then spell it out like thi| makeresults

... | table _time P1 P2 P3 Etc and Whatever
0 Karma

Sukisen1981
Champion
<your query>| fields P1,P2,P3,P4...
0 Karma
Get Updates on the Splunk Community!

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...