Splunk Search

how to add labels to chart values or order timechart

0range
Communicator

Hello.
My query looks like
...| timechart count by type
And I have values tupe_a, type_b and so on. When I call them like
eval name=case(type=type_a, "Error", type=type_b, "OK")...
and use "count by name" the rows in my staced timechart are ordered by name. But I need it to order by summary count. When I use "count by type" , they are ordered by summary count. How to specify the order or rename the types on the final chart?

Tags (3)
0 Karma

linu1988
Champion

Using timechart it's not possible as the values sorted will be distorting the time in the chart. Better use the stats function and do the calculation after the eval. Then apply the sort function. Thanks.

0 Karma

HiroshiSatoh
Champion

If you just add a total row

…|addcoltotals labelfield=name label=ALL

name count
Error 10
OK 100
ALL 110

0 Karma
Get Updates on the Splunk Community!

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...

Let’s Get You Certified – Vegas-Style at .conf24

Are you ready to level up your Splunk game? Then, let’s get you certified live at .conf24 – our annual user ...