Splunk Search

How to use a lookup table field to discard events?

JoserraRodrigo
New Member

We have a list of Ips in a lookup table and we want to search events that doesn't match with them.

The lookup definition "scanners_lookup" has a field called "Ip_Scanner" and the events in the index we are looking for has another called "source_ip". How do we build the search? We have tried several approachs that don't work.

For instance:

index=my_index | lookup scanners_lookup  Ip_Scanner | where source_ip != IP_scanner

Thank you!

Labels (1)
0 Karma

somesoni2
Revered Legend

Try like this

index=yourindex sourcetype=yourSourcetype [| inputlookup scanners_lookup | table Ip_Scanner | rename Ip_Scanner as source_ip ]
0 Karma
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...