All Apps and Add-ons

Database Lookup

dperry
Communicator

Im trying to create a DB lookup for specifically the value TranID=XXX (below is the log)

ID=975693273 SourceID=1 TeammemberID= Member=XXXXX SessionID=XXXXXXPageName=wssauthentication-login TranID=60 Description="Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36" Date=1420230863.050

my lookup table is called TranReferenceLookup and the colums are as follow:

ID  Name

1 8 Sign On
2 9 Sign Off
3 10 Admin Login
4 11 User or Member password invalid
5 12 Share Transfer
6 13 eNotice cancel
7 14 Password Change
8 15 CC Payment
9 16 Member disabled
10 17 BillpayDeletePayee
11 18 BillpayEditPayee
12 19 BillpayAddPayee
13 20 BillpayAddPayment
14 21 Stop Payment
15 22 Member not found

And so on......probable Im having is that the TranID field is not the same as the lookup colums ID. How do I tell Splunk to refer to this?

The command Im trying to do is

host=tstbpvsql10v2 sourcetype=olb_sql_source | table TranID | lookup TranReferenceLookup TranID OUTPUT Name

0 Karma
1 Solution

dperry
Communicator

I figured it out....by renaming the field to the column name I got the results:

host=XXXXXX sourcetype=olb_sql_source | rename TranID as ID | table ID | lookup TranReferenceLookup ID OUTPUT Name | top limit=40 Name

View solution in original post

0 Karma

dperry
Communicator

I figured it out....by renaming the field to the column name I got the results:

host=XXXXXX sourcetype=olb_sql_source | rename TranID as ID | table ID | lookup TranReferenceLookup ID OUTPUT Name | top limit=40 Name

0 Karma

chanfoli
Builder

That will work too 🙂

0 Karma

dperry
Communicator

Thanks!..you got me into the right mind of thinking.....

0 Karma

chanfoli
Builder

Hello,

Do you have the TranReferenceLookup object defined as a database lookup with the fields ID and Name set up as your lookup fields? Also, what has worked for me is to set up advanced database lookup settings and specify the input field and query. For example:

Input fields: TransID
Query: SELECT Name FROM tablename WHERE ID = $TransID$

0 Karma
Get Updates on the Splunk Community!

Introducing Splunk Enterprise 9.2

WATCH HERE! Watch this Tech Talk to learn about the latest features and enhancements shipped in the new Splunk ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...