Skip to main content

 

Splunk Lantern

Updating deprecated HTML dashboards in Splunk Enterprise

Applicability 

  • Product: Splunk Cloud Platform
  • Feature: Dashboards

Problem 

You are an administrator of a Splunk deployment that uses HTML dashboards, created by you by converting Simple XML dashboards to HTML dashboards. These were originally created so you could better handle complex functionality and styling in your app.

The ability to convert Simple XML to HTML dashboards was removed in Splunk Enterprise 8.1, but you have still been using your dashboards. Recently, older versions of jQuery have been deprecated and jQuery v3.5.0 (or newer) is being used instead. This change impacts your HTML dashboards, which depend on jQuery, so you'll need to change them to keep using them.

Solution

With the release of Splunk Dashboard Studio in Splunk Enterprise 8.2, Splunk now supports native capabilities to easily customize dashboards, without needing to convert to HTML or depend on custom development. Below is an example of a Studio dashboard.

How to check if you have HTML dashboards

HTML dashboards are defined as files in the following directories:

  • $SPLUNK_HOME/etc/apps/appname/local/data/ui/html/
  • $SPLUNK_HOME/etc/users/username/appname/local/data/ui/html/

You can check what HTML dashboards exist in your deployment by running the following search:

| rest splunk_server=local /servicesNS///data/ui/views search="eai:type=html" count=0
| rename title as view_name eai:acl.app as app eai:acl.owner as owner
| search owner=* app=*
| table view_name, owner, app
| join type=inner app
[ | rest splunk_server=local /servicesNS///apps/local count=0
| rename title as app label as app_label
| table app app_label]

How to update your HTML dashboards

You have three options for updating your HTML dashboards:

  1. The preferred and most durable option is to rebuild your HTML dashboard in Dashboard Studio. Dashboard Studio provides the out of the box capabilities needed to cover most customization use cases (for example adding images, free placement of objects, and more). 
  2. Alternatively, you can rebuild your dashboard as a Simple XML dashboard, extended with Custom JS. Unfortunately, you must rebuild the dashboard as there is no way to convert an HTML dashboard back to Simple XML. 
  3. The final option is to move your HTML files from /data/ui/html to /appserver/static/template and add a Single Page Application (SPA) view that specifies <view template="app-name:/template/path" type="html">. This option has the most overhead as you will be responsible for packaging all dependencies, and for managing future library updates. 

You can find more information about the jQuery update and HTML dashboard removal by visiting the developer docs portal

Additional resources

The content in this guide comes from a previously published blog, one of the thousands of Splunk resources available to help users succeed. In addition, these Splunk resources might help you understand and implement this use case:

  • Was this article helpful?