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!

Technical Workshop Series: Splunk Data Management and SPL2 | Register here!

Hey, Splunk Community! Ready to take your data management skills to the next level? Join us for a 3-part ...

Spotting Financial Fraud in the Haystack: A Guide to Behavioral Analytics with Splunk

In today's digital financial ecosystem, security teams face an unprecedented challenge. The sheer volume of ...

Solve Problems Faster with New, Smarter AI and Integrations in Splunk Observability

Solve Problems Faster with New, Smarter AI and Integrations in Splunk Observability As businesses scale ...