Dashboards & Visualizations

Add static HTML panel to simple HTML dashboard and reference local static content

tmuth_splunk
Splunk Employee
Splunk Employee

How do I add a static HTML panel to a simple HTML dashboard and reference local static content, such as images or PDFs? I'm on splunk 6.5+ and I'd also like to use a dynamic variable for the app name in the URL references.

1 Solution

tmuth_splunk
Splunk Employee
Splunk Employee

I'm glad you asked that question @tmuth ! I bet you searched for an answer and didn't find exactly what you were looking for. Note that with splunk 6.5+ we can use global tokens to access environment information - link

  1. Put static content in $SPLUNK_HOME/etc/apps/your_app/appserver/static . You can also create subdirectories there. In this case I put my file in ./doc/USERGUIDE-2015.pdf , so the full path for my "abc" app is $SPLUNK_HOME/etc/apps/abc/appserver/static/doc/USERGUIDE-2015.pdf
  2. I can now reference this file using the following path in a Simple XML dashboard because of the global tokens: /static/app/$env:app$/doc/USERGUIDE-2015.pdf
  3. Below is the full code for my Simple XML dashboard:

  doc
  
    
      
        

Documentation for this project

  • 2015 User Guide (local copy) - [here]

View solution in original post

tmuth_splunk
Splunk Employee
Splunk Employee

I'm glad you asked that question @tmuth ! I bet you searched for an answer and didn't find exactly what you were looking for. Note that with splunk 6.5+ we can use global tokens to access environment information - link

  1. Put static content in $SPLUNK_HOME/etc/apps/your_app/appserver/static . You can also create subdirectories there. In this case I put my file in ./doc/USERGUIDE-2015.pdf , so the full path for my "abc" app is $SPLUNK_HOME/etc/apps/abc/appserver/static/doc/USERGUIDE-2015.pdf
  2. I can now reference this file using the following path in a Simple XML dashboard because of the global tokens: /static/app/$env:app$/doc/USERGUIDE-2015.pdf
  3. Below is the full code for my Simple XML dashboard:

  doc
  
    
      
        

Documentation for this project

  • 2015 User Guide (local copy) - [here]
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...