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!

Splunk Observability Cloud | Unified Identity - Now Available for Existing Splunk ...

Raise your hand if you’ve already forgotten your username or password when logging into an account. (We can’t ...

Index This | How many sides does a circle have?

February 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

Registration for Splunk University is Now Open!

Are you ready for an adventure in learning?   Brace yourselves because Splunk University is back, and it's ...