Splunk Search

match range of ip

AdrienW
Explorer

Hi all,

I have some logs with a field called "src" containing ip.
I would like to use the command "match" like :

if(match(src,"^172.16") but with a range of IP (172.16 to 172.31)

How I could do that?

Thank you

Tags (1)
0 Karma
1 Solution

Ayn
Legend

cidrmatch("172.16.0.0/12",src) ?

View solution in original post

Ayn
Legend

cidrmatch("172.16.0.0/12",src) ?

AdrienW
Explorer

Thanks, I didn't know this function, work great !

0 Karma
Get Updates on the Splunk Community!

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...

.conf24 | Personalize your .conf experience with Learning Paths!

Personalize your .conf24 Experience Learning paths allow you to level up your skill sets and dive deeper ...

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...