Splunk Search

How to edit my search to change a line graph into pie chart to display only the top 5 results?

pavanae
Builder

I have a search as follows:

My search | timechart span=1h limit=0 count by users

Which displays a line graph for the past 7 days. Now I'm looking to modify the search to display only the top 5 users (based on the event count) in a pie chart. How can I modify my search to get the result like that?

0 Karma
1 Solution

cmerriman
Super Champion
My search |top 5 users

that should do it, but it won't be hourly.

View solution in original post

0 Karma

cmerriman
Super Champion
My search |top 5 users

that should do it, but it won't be hourly.

0 Karma

pavanae
Builder

And how can I display a tabular format of those top 5 users activities considering activity is a common field for all the users next to that pie chart?

0 Karma

cmerriman
Super Champion

to show it with the hour try this:

 My search |bucket _time span=1h| stats count by user _time|eval date=strftime(_time,"%D %H:%M")|eval userHour=user+" - "+date|sort - count|head 5|fields userHour count
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 ...