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!

Observe and Secure All Apps with Splunk

  Join Us for Our Next Tech Talk: Observe and Secure All Apps with SplunkAs organizations continue to innovate ...

Splunk Decoded: Business Transactions vs Business IQ

It’s the morning of Black Friday, and your e-commerce site is handling 10x normal traffic. Orders are flowing, ...

Fastest way to demo Observability

I’ve been having a lot of fun learning about Kubernetes and Observability. I set myself an interesting ...