Splunk Search

How to create a total volume label on each pie on a trellis dashboard panel

adamjones
Engager

I'm trying to display allowed vs blocked traffic for several different accounts. I think a trellis chart with a pie representing each account is a good way to display this. However, I want the dashboard to also convey the total volume of traffic for each account.

Here is my search (altered for simplicity/privacy):

index=(index) (more filters)
|(miscellaneous lookups and filters)
| chart count(_raw) over account by action
| addtotals allowed blocked

This gives me a table that looks like this:
alt text

Then that table then gives me a trellis pie chart dash that looks like this:

alt text

What I would like is for the numbers from the "totals" column in the table to populate with each of the corresponding pies as a label or something.

0 Karma

adamjones
Engager

@niketnilay Thank you. Its really close. The total is showing up, so that's awesome! For some reason when it's painting the pie it shows the allowed and blocked numbers, but its charting it by percentage of blocked compared to blocked so all the pies are showing up as 100% full. I've been tweaking it trying to make it work, but I cant quite get it. I tried messing with the chart settings, but there's not much there.

Any ideas?

alt text

0 Karma

niketn
Legend

@adamjones try the following search and confirm. The total should display along with Account Names.

  index=(index) (more filters)
 | (miscellaneous lookups and filters)
 | chart count by account action
 | addtotals allowed blocked
 | eval account=account." (".Total.")"
 | stats sum(allowed) as allowed  sum(blocked) as blocked by account
____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Splunk AI Assistant for SPL vs. ChatGPT: Which One is Better?

In the age of AI, every tool promises to make our lives easier. From summarizing content to writing code, ...

Data Persistence in the OpenTelemetry Collector

This blog post is part of an ongoing series on OpenTelemetry. What happens if the OpenTelemetry collector ...

Thanks for the Memories! Splunk University, .conf25, and our Community

Thank you to everyone in the Splunk Community who joined us for .conf25, which kicked off with our iconic ...