JDBC Driver for Splunk

Build 22.0.8462

Establishing a Connection

Creating a JDBC Data Source

You can create a JDBC data source to connect from your Java application. Creating a JDBC data source based on the CData JDBC Driver for Splunk consists of three basic steps:

  • Add the driver JAR file to the classpath. The JAR file is located in the lib subfolder of the installation directory. Note that the .lic file must be located in the same folder as the JAR file.
  • Provide the driver class. For example:
    cdata.jdbc.splunk.SplunkDriver
  • Provide the JDBC URL. For example:
    jdbc:splunk:user=MyUserName;password=MyPassword;URL=MyURL;
    
    or
    
    jdbc:cdata:splunk:user=MyUserName;password=MyPassword;URL=MyURL;

    The second format above can be used whenever there is a conflict in your application between drivers using the same URL format to ensure you are using the CData driver. The URL must start with either "jdbc:splunk:" or "jdbc:cdata:splunk:" and can include any of the connection properties in name-value pairs separated with semicolons.

Connecting to Splunk APIs

You must specify the URL to a valid Splunk server. By default the driver makes requests on port 8089.

By default, the driver attempts to negotiate TLS/SSL with the server. See SSL Configuration for more information on TLS/SSL configuration.

Authenticating to Splunk

Login with Splunk credentials is the only available authentication method for connecting to Splunk.

Splunk credentials

To authenticate with Splunk credentials, set the User and Password to your login credentials.

Splunk Token

To authenticate with Splunk token, set the AuthScheme to AccessToken; and AccessToken property to your token generated form Splunk UI under Users and Authentication/Tokens.

Copyright (c) 2023 CData Software, Inc. - All rights reserved.
Build 22.0.8462