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!

Upcoming Webinar: Unmasking Insider Threats with Slunk Enterprise Security’s UEBA

Join us on Wed, Dec 10. at 10AM PST / 1PM EST for a live webinar and demo with Splunk experts! Discover how ...

.conf25 technical session recap of Observability for Gen AI: Monitoring LLM ...

If you’re unfamiliar, .conf is Splunk’s premier event where the Splunk community, customers, partners, and ...

A Season of Skills: New Splunk Courses to Light Up Your Learning Journey

There’s something special about this time of year—maybe it’s the glow of the holidays, maybe it’s the ...