Splunk Search

Use lookup and stop matching for each entry in lookup

Path Finder

Hi All,

I am trying to use a lookup to check how many domains in a white list are actually being used.

The CSV has a single column with a list of domains

lookup CSV EG:

I am running the following query:

| search dhost [| inputlookup DevGlobalWhitelist_lookup.csv | rename domain as dhost | fields + dhost ]
| dedup dhost | table dhost

This query somewhat works, but it doesn't stop when it matches in the lookup CSV
EG Results:

The problem is the gateway doesnt have a field for the top domain, so we are getting multiple *microsoftonline.com events for example.

dhost is the domain field from the gateway logs.

Ideally i would like the query to dedup the field in the CSV lookup, so that once any results matches to the CSV file it will not check against that again.

What am i doing wrong?

Thank you in advance

0 Karma


Can you try this?

index=gateway  [| inputlookup DevGlobalWhitelist_lookup.csv | rename domain as dhost | eval dhost='*'.dhost.'*' | fields dhost ]
| dedup dhost 
| table dhost
0 Karma
Get Updates on the Splunk Community!

Observability | How to Think About Instrumentation Overhead (White Paper)

Novice observability practitioners are often overly obsessed with performance. They might approach ...

Cloud Platform | Get Resiliency in the Cloud Event (Register Now!)

IDC Report: Enterprises Gain Higher Efficiency and Resiliency With Migration to Cloud  Today many enterprises ...

The Great Resilience Quest: 10th Leaderboard Update

The tenth leaderboard update (11.23-12.05) for The Great Resilience Quest is out >> As our brave ...