Set Up Troubleshooting Tool for DB Connect
The troubleshooting tool for DB Connect enables you to use a command line utility for troubleshooting your own configuration for DB Connect, saving you time and effort.
- MS SQL
- You have an existing connection in DB Connect (click 'save anyway' even if there is an error).
- You have added the JDBC driver for your connection to the 'drivers' folder in DB Connect.
- You have CLI access to the instance you want to test.
- You should have Java 8 or higher JDK installed and can run the 'javac' command from the CLI.
These are the troubleshooting tool configuration steps for both Windows and Mac/Linux.
- Navigate to the
$SPLUNK_HOME\etc\apps\splunk_app_db_connect\bindirectory in DB Connect.
- Make sure the following environment variables are defined and have the following paths:
- JAVA_HOME: C:\Program Files\Java\jdk1.7.0_79\bin
- PATH: C:\Program Files\Java\jdk1.7.0_79\jre\bin\server
- PATH: C:\Program Files\Java\jdk1.7.0_79\bin
- Download and install Microsoft Visual C++ Build Tools (command-line tools subset of Visual Studio) for Python 3.5 and 3.6: https://visualstudio.microsoft.com/downloads/
- Navigate to the
$SPLUNK_HOME/etc/apps/splunk_app_db_connect/bindirectory in DB Connect.
Access the troubleshooting tool
- Run 'python dbx_connection_diag.py' or 'python3 dbx_connection_diag.py' or 'py dbx_connection_diag.py' depending on how your python3 command is set up.
- Choose the JDBC driver associated with the connection you wish to test. The utility should show all of the drivers in the DB Connect 'Drivers' directory.
- Provide the credentials for the local Splunk instance. The user will need to be an administrator.
- After verifying that DB Connect is installed on the local Splunk instance, you will be shown the connections available for testing. Choose the connection you want to test.
- Provide the database password for the user shown (This will be the user associated with this database connection).
- The utility will attempt to ping the database server. If successful, you will be shown the current settings for the database connection and be given a chance to modify them.
- The results of the test along with diagnosis and recommendations will display.
Troubleshooting Tool for DB Connect
Common issues for Splunk DB Connect
This documentation applies to the following versions of Splunk® DB Connect: 3.8.0, 3.9.0