Dashboards & Visualizations

How do I add a picture to my dashboard: V 6.6+

Splunk Employee
Splunk Employee

If I want to add imagery to my dashboard either through the simple xml or in a css file, what is the path I need to use?

With Splunk... the answer is always "YES!". It just might require more regex than you're prepared for!
0 Karma
1 Solution

SplunkTrust
SplunkTrust

@rsennett [Splunk] Image Overlay example in Splunk 6.x Dashboard Examples app does cover the static app folder. There are several answers already for how to upload image to Splunk.

Actually, what you should document that dependency on adding a static path to Splunk Dashboards is not required since 6.5 due to introduction of environment variables ($app:env$ in this case). By the way, this is also documented in Splunk 6.x Dashboard Examples App.

<img src="/static/app/$app:env$/images/picture.jpg"/>

This way you can use the same code in any app provided its respective appserver\static folder has required file in the correct place.
No need to have hard-coded image path like

<img src="/static/app/search/images/picture.jpg"/>
____________________________________________
| makeresults | eval message= "Happy Splunking!!!"

View solution in original post

SplunkTrust
SplunkTrust

@rsennett [Splunk] Image Overlay example in Splunk 6.x Dashboard Examples app does cover the static app folder. There are several answers already for how to upload image to Splunk.

Actually, what you should document that dependency on adding a static path to Splunk Dashboards is not required since 6.5 due to introduction of environment variables ($app:env$ in this case). By the way, this is also documented in Splunk 6.x Dashboard Examples App.

<img src="/static/app/$app:env$/images/picture.jpg"/>

This way you can use the same code in any app provided its respective appserver\static folder has required file in the correct place.
No need to have hard-coded image path like

<img src="/static/app/search/images/picture.jpg"/>
____________________________________________
| makeresults | eval message= "Happy Splunking!!!"

View solution in original post

Esteemed Legend

Have you checked out the Splunk 6.X Dashboard Examples app?

https://splunkbase.splunk.com/app/1603/

Splunk Employee
Splunk Employee

See below. I was simply posting the answer in a clear way... as it usually trails below long chains of question and answer from long ago.
... it's not in there, btw.
But it probably should be!

With Splunk... the answer is always "YES!". It just might require more regex than you're prepared for!
0 Karma

Splunk Employee
Splunk Employee

The path you put in the code, has nothing to do with reality.

<img src="/static/app/search/images/picture.jpg"/>

And put the image here:

   $SPLUNK_HOME/splunk/etc/apps/search/static/images/picture.jpg
With Splunk... the answer is always "YES!". It just might require more regex than you're prepared for!

Splunk Employee
Splunk Employee

There is nothing new or special about this. I simply wanted it to be a searchable answer. It can also be found as the last entry in any number of questions asked where the method was different in earlier releases. I believe this works like this since about version 6.1

With Splunk... the answer is always "YES!". It just might require more regex than you're prepared for!
0 Karma