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 (1)
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
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Take Action Automatically on Splunk Alerts with Red Hat Ansible Automation Platform

 Are you ready to revolutionize your IT operations? As digital transformation accelerates, the demand for ...

Calling All Security Pros: Ready to Race Through Boston?

Hey Splunkers, .conf25 is heading to Boston and we’re kicking things off with something bold, competitive, and ...

Beyond Detection: How Splunk and Cisco Integrated Security Platforms Transform ...

Financial services organizations face an impossible equation: maintain 99.9% uptime for mission-critical ...