Dashboards & Visualizations

How to embed an image in a dashboard?

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

SplunkTrust
SplunkTrust

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!!!"

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

Contributor

it is like this: Test Image

0 Karma

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

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