Splunk Search

How to use a lookup to filter raw data from a log?

jip12048
Engager

Hi all,

I am new to Spluntk and have problem with my search.

I have a Lookup table: Error.csv

Filter
*Error1*
*Error2*
*Error3*
...

I want to use this Lookup table to filter the raw data from logs.  However the raw data does not exactly match the values from the Lookup but rather includes Error1, Error2 ... I am trying to only show the logs that do not include these specific messages from the Lookup table.

My query:

basesearch | table _raw, host, source [| inputlookup Error.csv ]| fields Filter| where NOT raw=Filter

The query does not show any results and i have been trying to get it to work for hours now, but somehow can not figure out how.

Labels (2)
0 Karma
1 Solution

gcusello
SplunkTrust
SplunkTrust

Hi @jip12048,

you have to use a feature of lookups, please try this solution:

basesearch [ | inputlookup Error.csv | rename error as query | fields query ]
| table _time _raw host source

 Ciao.

Giuseppe

View solution in original post

gcusello
SplunkTrust
SplunkTrust

Hi @jip12048,

you have to use a feature of lookups, please try this solution:

basesearch [ | inputlookup Error.csv | rename error as query | fields query ]
| table _time _raw host source

 Ciao.

Giuseppe

Get Updates on the Splunk Community!

Why You Can't Miss .conf25: Unleashing the Power of Agentic AI with Splunk & Cisco

The Defining Technology Movement of Our Lifetime The advent of agentic AI is arguably the defining technology ...

Deep Dive into Federated Analytics: Unlocking the Full Power of Your Security Data

In today’s complex digital landscape, security teams face increasing pressure to protect sprawling data across ...

Your summer travels continue with new course releases

Summer in the Northern hemisphere is in full swing, and is often a time to travel and explore. If your summer ...