Splunk Search

How to position a value in table in the last column?

vvemula
Path Finder

I have result like this, 

parametercompliancenon-compliance
64bit4322
Bios2441
Error065
Inter641
OS614

 

And I want Error to be displayed in the last column, Like below:

parametercompliancenon-compliance
64bit4322
Bios2441
Inter641
OS614
Error065

 

is it something possible in Splunk without CSS or JS. 

Labels (2)
0 Karma

vvemula
Path Finder

@gcusello  Thanks for the help. But its not working. 

--> As per your search, after modify the Error to "zzz_Error", Its coming in the last row. But once I use eval to change from "zzz_Error" to Error. Its going back to the original position again. 

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @vvemula,

did you respected the order of commands: eval, chart, eval?

in my Splunk it runs:

gcusello_0-1605599170246.png

Ciao.

Giuseppe

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @vvemula,

you have to temporary modify Error value to be sure that it's the last one and, at the end, restore the original value, something like this:

your_search
| eval parameter=if(parameter="Error","ZZZZ_Error",parameter)
| chart count over status BY parameter
| eval parameter=if(parameter="ZZZZ_Error","Error",parameter)

Ciao.

Giuseppe 

0 Karma
Get Updates on the Splunk Community!

Developer Spotlight with Paul Stout

Welcome to our very first developer spotlight release series where we'll feature some awesome Splunk ...

State of Splunk Careers 2024: Maximizing Career Outcomes and the Continued Value of ...

For the past four years, Splunk has partnered with Enterprise Strategy Group to conduct a survey that gauges ...

Data-Driven Success: Splunk & Financial Services

Splunk streamlines the process of extracting insights from large volumes of data. In this fast-paced world, ...