Splunk Search

How to find the counting based on number of values

Ashishanand
New Member

i used the following command
index=ABC
| stats values(L) AS USER

i need the output like below
user usercount
Ramesh 54
Somesh 12
Kamlesh 27

Tags (1)
0 Karma

HiroshiSatoh
Champion

Try this!

index=ABC
| stats count AS usercount by L
| rename L as user 
0 Karma
Get Updates on the Splunk Community!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...