Splunk Search

How to compare a compare a field in an event with a field in a lookup?

newbiesplunk
Path Finder

Hi,

I wish to do a comparison of the field in the event with the lookup to determine the occurrence of the field in the lookup? thks

Tags (1)
0 Karma

kml_uvce
Builder

try this
index=index name [|inputlookup lookupfilename|table fieldname]|table fieldname

0 Karma

newbiesplunk
Path Finder

Hi,
If i want to display all the columns in the lookup, and the stats of the column from the event as shown in next example, the lookup file have only one column "ownername", what will be the approach?

result of the search:

ownername # of car
tom

harry 1
Kim 2
John

0 Karma

newbiesplunk
Path Finder

Hi, for better understanding your answers.
Lookup filename: test33
Firstname,secondname,gender

If my event contain only the name and gd,

if index=index name [|inputlookup test33|table secondname,gender]|table name, gd correct?
thks

0 Karma

newbiesplunk
Path Finder

i want to compare secondname in lookup table with name in the event. And gender in lookup table with gd in the event. So there might be a case whereby gd and/or name in the event is empty.

0 Karma

kml_uvce
Builder

try this
index=index name [|inputlookup test33|rename secondname AS name|rename gender AS gd|table name, gd]|table name, gd

0 Karma

newbiesplunk
Path Finder

Hi,
The result show two column with name, gd only. how do i know which info is shown in lookup and not in event? thks

0 Karma

kml_uvce
Builder

please explain me which field names in event and lookup table ,you want to do the comparison

0 Karma
Get Updates on the Splunk Community!

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...

Let’s Get You Certified – Vegas-Style at .conf24

Are you ready to level up your Splunk game? Then, let’s get you certified live at .conf24 – our annual user ...