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

@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

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

BSides Splunk 2022 - The Call for Papers is now Open!

TLDR; Main Site: https://bsidessplunk.com CFP Site: https://bsidessplunk.com/cfp CFP Opens: December 15th, ...

Sending Metrics to Splunk Enterprise With the OpenTelemetry Collector

This blog post is part of an ongoing series on OpenTelemetry. The OpenTelemetry project is the second largest ...

What's New in Splunk Cloud Platform 9.0.2208?!

Howdy!  We are happy to share the newest updates in Splunk Cloud Platform 9.0.2208! Analysts can benefit ...