Splunk Search

Distinct values

SplnkUse
Path Finder

Hello

 

I am running a * search in an app and it returns several columns in the csv extract where a column is named 'source'.

 

I want to return the distinct values of 'source' but neither of the below work:

| values(source)

or

| distinct source

 

Any idea?

 

thanks!

Labels (2)
Tags (1)
0 Karma
1 Solution

yuanliu
SplunkTrust
SplunkTrust

I want to return the distinct values of 'source' but neither of the below work:

| values(source)

or

| distinct source

values and distinct  are not  commands.  Have you tried stats?

| stats values(source) dc(source)

 

View solution in original post

Tags (1)
0 Karma

yuanliu
SplunkTrust
SplunkTrust

I want to return the distinct values of 'source' but neither of the below work:

| values(source)

or

| distinct source

values and distinct  are not  commands.  Have you tried stats?

| stats values(source) dc(source)

 

Tags (1)
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust
| dedup source
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!

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 ...