Splunk Search

Splunk DB Connect: Why am I unable to perform a lookup to enhance my dbquery results?

dstaulcu
Builder

I'd like to be able to enhance DB Connect results with details in a lookup table file.

For some reason, the lookup is not working. I know the host field exists both in my dbquery results and my lookup table file. Here is the syntax I am using:

| dbquery "myconnection" "mysqlquery" 
| fields host interestingvalue 
| lookup hostdetails.csv host OUTPUT interestinghostdetail

Anyone have any ideas why this isn't working / wouldn't work?

Inputs appreciated!

0 Karma

ckurtz
Path Finder

Make sure that the lookup of hostdetails.csv is available inside the DBXv1 app context.

0 Karma

woodcock
Esteemed Legend

Try without fields.

0 Karma

javiergn
SplunkTrust
SplunkTrust

I would do it differently and using subsearches and inputlookup:

| inputlookup hostdetails
| search [| dbquery "myconnection" "mysqlquery" | table host interestingvalue]

javiergn
SplunkTrust
SplunkTrust

Keep in mind you could have the dbquery first and then filter based on your inputlookup

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 ...