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!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

Splunk is officially part of Cisco

Revolutionizing how our customers build resilience across their entire digital footprint.   Splunk ...

Splunk APM & RUM | Planned Maintenance March 26 - March 28, 2024

There will be planned maintenance for Splunk APM and RUM between March 26, 2024 and March 28, 2024 as ...