Splunk Search

eval case/cidrmatch using two fields as a condition

Path Finder

How can I use cidrmatch or case using 2 conditions?

Example: I only want to get list of IPs where row_A is and row_B is

Current Table:
row_A row_B

Target Result:
row_A row_B


Tags (2)
0 Karma


hi @whitefang1726,

Use where command like this:

| where cidrmatch("", row_A) and cidrmatch("", row_B)

Smaple query:

| makeresults 
| eval _raw=" row_A row_B" 
| multikv forceheader=1 
| where cidrmatch("", row_A) and cidrmatch("", row_B)
| fields - _raw, _time, linecount
0 Karma
Get Updates on the Splunk Community!

Optimize Cloud Monitoring

  TECH TALKS Optimize Cloud Monitoring Tuesday, August 13, 2024  |  11:00AM–12:00PM PST   Register to ...

What's New in Splunk Cloud Platform 9.2.2403?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.2.2403! Analysts can ...

Stay Connected: Your Guide to July and August Tech Talks, Office Hours, and Webinars!

Dive into our sizzling summer lineup for July and August Community Office Hours and Tech Talks. Scroll down to ...