Splunk Search

How to display a count in the labels on my pie chart?

prashanthberam
Explorer

hi guys...

I want to display the count in the labels in the pie chart, and in the title, I want to display another count above the pie chart

Will that be possible, and if yes, can you please tell me how to do that?

thanks advance
alt text

0 Karma

gokadroid
Motivator

If this pie chart is part of dashboard panel then yes both are possible. Setting of the labels however can be achieved with or without the pie chart being as a panel though. If your Success and Failure are plotted in pie chart using field myStatusField as follows:

your query to return myStatusField
| stats count by myStatusField

Then change the above query to the one as below:

your query to return myStatusField
| stats count by myStatusField
| eval myStatusField=myStatusField." : ".count

For setting the title of pie chart (which will be panel title) with a search you have to first populate a token with the search result and then use the token value in the title of the panel. Have a look at similar example here:

https://answers.splunk.com/answers/374043/why-am-i-unable-to-populate-a-token-with-the-resul.html

0 Karma

prashanthberam
Explorer

can i change those sclise name instead of success and failure

0 Karma
Get Updates on the Splunk Community!

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...

.conf24 | Personalize your .conf experience with Learning Paths!

Personalize your .conf24 Experience Learning paths allow you to level up your skill sets and dive deeper ...

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...