Splunk Search

Pie Chart - How to show my own field instead of Count% ?

fpedrosa
Engager

Hi,

I have this search:

| stats count by application
| eval application = case(
      application=="malware-detection", "Malware",
      !isnull(application), upper(substr(application,1,1)).substr(application,2)
      )
| eventstats sum(count) as total
| eval count_2=round(100*count/total,2)
| fields- total
| eval count_perc="".count_2."%"
| rename application as Application, count as Count

 

and I would like to show the Application, Count and count_perc fields on mu Pie Chart, but splunk still show the Count%.

fpedrosa_0-1664194189697.png



My goal is to round the percentage, how can I do this?

Thanks for support!

Labels (1)
0 Karma

FelixLeh
Contributor

The percentage shown is calculated as part of the Pie Chart Visualisation. As far as I know there are no Formatting Options (UI or SourceCode) that can change this. So the only way I can imagine is to make a custom visualisation that is an exact copy of the Splunk-Build Pie Chart and modify the code in there. 
But I don't know if that effort is worth it.

My only other guess would be to look into the code of the page and see if there is a possibility to modify it through HTML Code Inserted into the XML Code of the Dashboard but that's a far stretch

_______________________________________

If this was helpful please consider awarding Karma. Thx!

0 Karma
Get Updates on the Splunk Community!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...