Use SplunkJS Stack in your own web apps

Just as you can create powerful interactive web apps hosted within Splunk Web, you can use SplunkJS Stack to integrate Splunk into your own web apps. Adding the SplunkJS Stack libraries to your web site enables you to use all of Web Framework components to interact and view your Splunk data.

To use SplunkJS Stack in your own web apps, download SplunkJS Stack, which contains the necessary Web Framework libraries and styles. This package also includes minified and non-minified versions. Then, see How to add Splunk to your own web apps using SplunkJS Stack.

For your web apps that run outside of Splunk Web, you can build a client-side-only app using HTML, CSS, and JavaScript. Because web apps that run outside of Splunk Web are running on a different backend server, there are a few differences when developing these apps:

  • Communication with the Splunk server: Web apps that run outside of Splunk Web need to use a proxy server or cross-origin resource sharing (CORS) to communicate with the Splunk server.
  • Authentication and login : Web apps that run outside of Splunk Web need to implement a custom authentication function to log users into Splunk.
  • Drilldown behavior: The default drilldown action for Splunk Web apps redirects users to the Search app. But for apps outside Splunk Web, a default drilldown action is not defined. To enable drilldown in those apps, you can create a default drilldown action by defining an onDrilldown function in the SplunkJS Stack configuration, or use click events to create drilldown actions for individual views.
  • SplunkMap view: The "splunk" tile source is not supported. Use the "openStreetMap" tile set with the SplunkMap view.