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!

Enter the Splunk Community Dashboard Challenge for Your Chance to Win!

The Splunk Community Dashboard Challenge is underway! This is your chance to showcase your skills in creating ...

.conf24 | Session Scheduler is Live!!

.conf24 is happening June 11 - 14 in Las Vegas, and we are thrilled to announce that the conference catalog ...

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...