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!

Splunk Smartness with Brandon Sternfield | Episode 3

Hello and welcome to another episode of "Splunk Smartness," the interview series where we explore the power of ...

Monitoring Postgres with OpenTelemetry

Behind every business-critical application, you’ll find databases. These behind-the-scenes stores power ...

Mastering Synthetic Browser Testing: Pro Tips to Keep Your Web App Running Smoothly

To start, if you're new to synthetic monitoring, I recommend exploring this synthetic monitoring overview. In ...