Splunk Search

How to get values count to display in table?

NizanCohen
Explorer

Hi all.

I wish to display in a table format the value's count.

For example;

Computer A has 100 sessions.

Computer B has 50 sessions.

I want to display the 100 and and the 50 values alongside "Computer A" and "Computer B".

 

Thanks!

Labels (1)
0 Karma
1 Solution

FrankVl
Ultra Champion

Sounds like all you need is to add the following to your query:

| stats count by fieldname

Where "fieldname" should be whatever field you want to see the counts of.

Alternatively, if you only want the top ten for example, you can also take a look at the top command

View solution in original post

0 Karma

NizanCohen
Explorer

No, those are general example that express my search.

Let me explain more: 

1. I have the fields inside "Interesting fields"

2. I select one - for example: "Username" - and click on it.

3.  I get top 10 values with the used usernames and their count.

4. I wish to display in a table (or any other way) the count of the used usernames.

 

Hope this explains it better.

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust
| stats count by username
0 Karma

FrankVl
Ultra Champion

Sounds like all you need is to add the following to your query:

| stats count by fieldname

Where "fieldname" should be whatever field you want to see the counts of.

Alternatively, if you only want the top ten for example, you can also take a look at the top command

0 Karma

NizanCohen
Explorer

YES.

Thank you!

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Are those examples of your events?

Do you have any fields already extracted?

0 Karma
Get Updates on the Splunk Community!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...