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!

Building Reliable Asset and Identity Frameworks in Splunk ES

 Accurate asset and identity resolution is the backbone of security operations. Without it, alerts are ...

Cloud Monitoring Console - Unlocking Greater Visibility in SVC Usage Reporting

For Splunk Cloud customers, understanding and optimizing Splunk Virtual Compute (SVC) usage and resource ...

Automatic Discovery Part 3: Practical Use Cases

If you’ve enabled Automatic Discovery in your install of the Splunk Distribution of the OpenTelemetry ...