Dashboards & Visualizations

How to embed an image in a dashboard?

hemendralodhi
Contributor

Hello All,

I am trying to embed image in a user manual dashboard and tried various methods from this forum, but the is image is not loading. I have copied the image in ../apps/myapp/appserver/static directory.

I am trying to show the image like below:

Complete code in html tag

<p>1. Go to Development Kit tab and Click Dashboard <img src="/static/app/myapp/select_dashboard.PNG" alt="Test Image"> &lt;br/&gt;

........so on

Tried Splunk Web Prefix and various other methods, but not sure now where to look.

Thanks
Hemendra

0 Karma

niketn
Legend

If your app name is myapp then following should be your image attribute in dashboard HTML panel

<img src="/static/app/myapp/imagefilename.png" /> 

Refer to Image Overlay with Single Values example on the Splunk 6.x Dashboard Examples app.

Adding a static file requires Splunk restart and also refresh of browser's history from cache.

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"

hemendralodhi
Contributor

Hello niketnilay,

Thanks for your response. I am using the same string Test Image and copied image to required ../appserver/static folder but it is showing text only and not image.

Here is the snippet I am using:

User Manual

<panel>
  <html>

How to build Custom dashboard from existing

User can select existing dashboards and can build their own set as per their needs.

Follow Below Steps to build custom dashboards

1. Go to Development Kit tab and Click Dashboard Test Image
2. Click "Create New Dashboard"
3. Enter Dashboard Title Description and permission(Shared in App:Available to all app users,Private:Available to you only)
4. Go to Edit -> Edit Panel
5. Click "Add Panel" -> "Clone from Dashboard" and Select individual dashboards from "Build Your Own Dashboard"<br/> 6. Preview and "Add to dashboard" . You can rearrange the panels accordingly and click "Done"

</panel>

I did restart and /debug/refresh also.

0 Karma

hemendralodhi
Contributor

it is like this: Test Image

0 Karma

jkat54
SplunkTrust
SplunkTrust

Did you try

   <html><img src="/static/..."/></html>

Like shown here?: http://docs.splunk.com/Documentation/Splunk/6.0/Viz/PanelreferenceforSimplifiedXML#html

What version of splunk do you have?

0 Karma

hemendralodhi
Contributor

Hello jkat54,

Thanks for your response. I am using v6.4.1. Details of snippet above.

html tag is used at start and end of the whole html file. I tried using additional on for img src also but same result.

Test Image

0 Karma
Get Updates on the Splunk Community!

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...