Dashboards & Visualizations

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

rsennett_splunk
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

niketn
Legend

@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

niketn
Legend

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

woodcock
Esteemed Legend

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

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

rsennett_splunk
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

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

rsennett_splunk
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
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 ...