Splunk Search

How to remove few IP's from a query that exists in lookup table ?

innoce
Path Finder

Newbie here...!

I have a list of IP's in a CSV from which I need to exclude few IP's (IP1, IP2, IP3, etc.,) from the results of a query. Here's how my search looks.

Example search: 
base search
| join type=left ip
[| inputlookup iplist.csv |fields ip]
|fields

Any help would be appreciated. Thanks 🙂

Labels (2)
0 Karma
1 Solution

richgalloway
SplunkTrust
SplunkTrust

Filter the results using the where command.

base search
| join type=left ip
[| inputlookup iplist.csv |fields ip]
| where NOT ip IN (<list of IPs to exclude>)
|fields

 

---
If this reply helps you, Karma would be appreciated.

View solution in original post

0 Karma

richgalloway
SplunkTrust
SplunkTrust

Filter the results using the where command.

base search
| join type=left ip
[| inputlookup iplist.csv |fields ip]
| where NOT ip IN (<list of IPs to exclude>)
|fields

 

---
If this reply helps you, Karma would be appreciated.
0 Karma
Get Updates on the Splunk Community!

Splunk Mobile: Your Brand-New Home Screen

Meet Your New Mobile Hub  Hello Splunk Community!  Staying connected to your data—no matter where you are—is ...

Introducing Value Insights (Beta): Understand the Business Impact your organization ...

Real progress on your strategic priorities starts with knowing the business outcomes your teams are delivering ...

Enterprise Security (ES) Essentials 8.3 is Now GA — Smarter Detections, Faster ...

As of today, Enterprise Security (ES) Essentials 8.3 is now generally available, helping SOC teams simplify ...