Splunk Search

Getting unique values of a field.

splunkpoornima
Communicator

Hi all. I have a field called TaskAction that has some 400 values. But, I only want the distinct values of that field.

Plz help me with the query.

Labels (1)
Tags (1)
1 Solution

Ayn
Legend

There's dedup, and there's also the stats operator values.

View solution in original post

bbialek
Path Finder

This seems to work when trying to find unique values for a field, like 'host':
* | chart count by host

Ayn
Legend

There's dedup, and there's also the stats operator values.

andrewb_splunk
Splunk Employee
Splunk Employee

The Splunk Enterprise version 5.0 documentation from 2012 is no longer available. Similar information is available in newer versions of the Splunk documentation. Replace "5.0" in the URL with "latest" or a more recent version number to view the topics. 

dedup: https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Dedup 

stats: https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/CommonStatsFunctions 

0 Karma

slierninja
Communicator

stats values(field) is what I used.

Get Updates on the Splunk Community!

Enterprise Security Content Update (ESCU) | New Releases

In December, the Splunk Threat Research Team had 1 release of new security content via the Enterprise Security ...

Why am I not seeing the finding in Splunk Enterprise Security Analyst Queue?

(This is the first of a series of 2 blogs). Splunk Enterprise Security is a fantastic tool that offers robust ...

Index This | What are the 12 Days of Splunk-mas?

December 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...