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!

Detecting Remote Code Executions With the Splunk Threat Research Team

REGISTER NOWRemote code execution (RCE) vulnerabilities pose a significant risk to organizations. If ...

Observability | Use Synthetic Monitoring for Website Metadata Verification

If you are on Splunk Observability Cloud, you may already have Synthetic Monitoringin your observability ...

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...