Splunk Search

How to use a lookup to omit data from results?

ho000dor
Explorer

Hi,
Do i need to do a subsearch for this or is there a more efficient way?

I'm trying to ignore every URL in the "URL" column from the lookup...

index="test1" RESPONSE="50*" URL="*" NOT | lookup 500KNOWN URL

The lookup just has a column with URLs that I want to ignore.

Tags (3)
1 Solution

somesoni2
Revered Legend

Use this syntax

   index="test1" RESPONSE="50*" NOT [|inputlookup 500KNOWN | table URL]

View solution in original post

Raghav2384
Motivator

I would use a sub-search.
Example: sourcetype=testapp [|inputlookup userlookup.csv|rename username as user|fields user|where user != "user4"]|stats count by user

0 Karma

subtrakt
Contributor

Thanks I'll give this a shot!

0 Karma

somesoni2
Revered Legend

Use this syntax

   index="test1" RESPONSE="50*" NOT [|inputlookup 500KNOWN | table URL]

subtrakt
Contributor

index="test1" RESPONSE="50*" NOT [|inputlookup 500KNOWN | table URL] | timechart count by URL

0 Karma

somesoni2
Revered Legend

What is your current query with timechart?

0 Karma

subtrakt
Contributor

Thanks! Will this work with timechart on the main search?

0 Karma
Get Updates on the Splunk Community!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...