Splunk Search

While building web application on splunk, how to add my HTML page to a new app?

omerl
Path Finder

Hello!

I'm looking to build a web app on splunk in order to centralize all of my apps on one place. I've found out that doing it on splunk will be the best solution, as splunk does not let me embed dashboards on external sites (although it let me embed reports, but I need more than that).

I tried to add my HTML page to a new app, and its resources to the /appserver/static, And I found that my .css files are not loaded into my app. So I tried to check what's wrong by loading them into a splunk dashboard converted to html, but then it worked. I would like to know if anyone had this problem, or may know what I was doing wrong on my new app HTML page.

I would also like to know if any of you tried to do the same thing - is it a good solution? Should I try another ways to integrate splunk dashboards on an external web site? would it be hard to maintain web application as splunk app?

Thanks!

0 Karma

niketn
Legend

@omerl, for adding static files to your dashboard like JavaScript and CSS, you should include them in the dashboard root node not in the html file.

Refer to following answer for various options to add CSS to Simple XML Dashboard with CSS Extension: https://answers.splunk.com/answers/590387/how-do-i-update-panel-color-in-splunk-using-css-1.html

You should also check out Splunk Dashboard Examples app from Splunkbase for examples for adding CSS, JavaScript and HTML files to Splunk Dashboard.

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
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 ...