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!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

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

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...