Splunk Search

Count is incorrect

TitanAE
New Member

Trying to write a simple query in Splunk 7.0. The idea is that it would count all the unique ip addresses based on a specific location. So my query would look like this:

splunk index="some index" sourcetype="some sourcetype" earliest=-24h
stats count(ip) by location

After 100 rows, and (by my eyes) at least 12 unique addresses... it counts 5. So instead of:

  • location a ... 6
  • location b ... 10
  • location c ... 5

I get

  • location x ... 5

What gives?

Tags (2)
0 Karma

to4kawa
Ultra Champion
index="some index" sourcetype="some sourcetype" earliest=-24h
|stats count(ip) as ip_count dc(ip) as unique_ip_count by location

hi, @TitanAE
please provide your output details.

0 Karma

TitanAE
New Member

Okay... apparently verbose search really is slowing down my search.

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