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!

Index This | What is broken 80% of the time by February?

December 2025 Edition   Hayyy Splunk Education Enthusiasts and the Eternally Curious!    We’re back with this ...

Unlock Faster Time-to-Value on Edge and Ingest Processor with New SPL2 Pipeline ...

Hello Splunk Community,   We're thrilled to share an exciting update that will help you manage your data more ...

Splunk MCP & Agentic AI: Machine Data Without Limits

Discover how the Splunk Model Context Protocol (MCP) Server can revolutionize the way your organization uses ...