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
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Community Content Calendar, September edition

Welcome to another insightful post from our Community Content Calendar! We're thrilled to continue bringing ...

Splunkbase Unveils New App Listing Management Public Preview

Splunkbase Unveils New App Listing Management Public PreviewWe're thrilled to announce the public preview of ...

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...