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 September, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...

New in Observability - Improvements to Custom Metrics SLOs, Log Observer Connect & ...

The latest enhancements to the Splunk observability portfolio deliver improved SLO management accuracy, better ...

Improve Data Pipelines Using Splunk Data Management

  Register Now   This Tech Talk will explore the pipeline management offerings Edge Processor and Ingest ...