Getting Data In

CIDR search on host field

afaraino
Explorer

Hello Everyone,

I'm facing a strange behavior here :

  • searching host=10.1.2.* returns 511,000+ results
  • searching host=10.1.2.0/24 returns 807 results

Am I missing something?

I'm using Splunk 4.2.4.

Regards,

Alexandre Faraino

Tags (2)
0 Karma

tmeader
Contributor

Is there any update on whether or not this is going to be fixed? I'm running into the same issue as the original author right now.

0 Karma

SarahWKarvenz
Path Finder

Are the ones returning for the subset of records from a specific data input or set of inputs? I am finding that the CIDR search host=127.0.0.1/24 will work if Splunk is setting the host as the IP which it does for data inputs of type TCP or UDP. If I use a file or directory input type and then set the host field value to an IP address, those data inputs aren't picked up in the CIDR search host=127.0.0.1/24 but will be found in the search host=127.0.0.*

One way around it is to use the cidrmatch function as it will pick up records from both types of data inputs:
* | where cidrmatch("127.0.0.1/24", host), but so will the 127.0.0.*

afaraino
Explorer

Actually, it's 100% UDP. So the host field should be an IP. The cidrmatch() function is working, but it's not user-friendly.

I tried something else :

  • host=10.1.2.* host=10.1.2.0/24
    --> returns nothing

  • host=10.1.2.* | search host=10.1.2.0/24
    --> returns 48k+ matches

Bug spotted ? I'll open a case.

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Data Persistence in the OpenTelemetry Collector

This blog post is part of an ongoing series on OpenTelemetry. What happens if the OpenTelemetry collector ...

Introducing Splunk 10.0: Smarter, Faster, and More Powerful Than Ever

Now On Demand Whether you're managing complex deployments or looking to future-proof your data ...

Community Content Calendar, September edition

Welcome to another insightful post from our Community Content Calendar! We're thrilled to continue bringing ...