How to do it...

Follow the steps in this recipe to generate a local Splunk lookup using data from an external database using your Splunk DB Connect installation:

  1. Log in to your Splunk server.
  2. Select the Operational Intelligence application.
  3. Enter the following search in the search bar:
| dbxquery connection=products_database query="SELECT%20*%20FROM%20productInventory" shortnames=true| fields - _raw, _time | table *

Notice how we modified the SQL query in the search syntax to be a URL encoded format. The contents of the productInventory table should now be displayed inside Splunk:

  1. Amend the search as follows in order to save the database ...

Get Splunk Operational Intelligence Cookbook - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.