SplunkJS Stack must be configured to use SplunkJS Stack components in your own web applications that run outside of Splunk Web.
Key | Default | Description |
app | "search" | Sets the namespace (the app context) for accessing Splunk entities. |
authenticate | Required. A function or dictionary that authenticates a user's credentials in order to log in to Splunk. This value can be one of the following:
| |
custom | Additional keys, only to be set when directed to by Splunk Support. | |
freeLicense | false | Indicates whether Splunk is using the free license. |
host | "localhost" | The host name of the Splunk server. |
locale | "en-us" | The locale code indicating the language for the user interface. |
onDrilldown | A function that is called as the default drilldown action. By default, this function is not defined. The function signature is (params, newWindow):
| |
onSessionExpired | authenticate | A function that is called when the session times out, or if the session key is not valid. By default, this function calls authenticate. The function signature is (authFunction, done):
|
port | 8089 | The port number of the Splunk server. |
proxyPath | The absolute URL path of the server-side proxy to the Splunk server. If this key is not set, Splunk is directly accessed using cross-origin resource sharing (CORS) at scheme://host:port. | |
scheme | "https" | The scheme for accessing the Splunk server. |
splunkjs.config({ proxyPath: "/proxy", scheme: "https", host: "localhost", port: 8089, authenticate: function (done) { // TO DO: Custom function }, onSessionExpired: function(authenticate, done) { // TO DO: Custom function }, onDrilldown (drilldown) { // TO DO: Custom function } });