Splunk Search

Distinct count returns less results than expected

sarit_s
Communicator

Hello
Im running this query:

index="prod"
| rex field=source "(?<crate>.*?)/"
| stats dc(crate)H 

But the number of results is 400 less than expected.
Im wondering if the query is wrong or something is not working with the indexing ?

Thanks

0 Karma

richgalloway
SplunkTrust
SplunkTrust

It's impossible to answer without seeing the data. It could be your regex is incorrect and not properly extracting the crate field. It could be your data is not as varied as you think it is. Perhaps the data needs to be normalized before it is counted.

---
If this reply helps you, Karma would be appreciated.
0 Karma
Get Updates on the Splunk Community!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

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