Spread our blog

How to Customize a Dashboard using HTML in Splunk

Hello guys!!

Are you feeling bored by using XML dashboard?? Have you ever thought of changing the visualization in Splunk?? Here we have come with a new interesting and attractive topic of Splunk that is how to customize a dashboard using HTML. For customizing the a dashboard follow the below steps.

Step 1:
Create a simple XML dashboard using the below query.

index=_internal  | stats count by sourcetype

Also we have given the dashboard name as Pie Chart Dashboard. Click on Save to create the dashboard. Then click on View Dashboard to see the dashboard.




Step 2:
In the XML dashboard we can’t make more attractive . Now convert the dashboard to HTML . You can see    button on the top right corner of the dashboard. Click on that and next click on Convert to HTML to convert the dashboard into HTML.


Step 3:
Now you can specify a new name for the html dashboard . Click on Convert Dashbaord to save the dashboard . We have given the name as Pie Chart Dashboard HTML for the html dashboard. Click on View to see the dashboard.




Step 4:
Click on Edit to edit the source code of the HTML Dashboard.

Step 5:
We will modify into the following marked portions.


Step 6:
We have written custom CSS inside style tag.
We have called custom CSS inside the div tag. For dashboard name we have called dashboard . For a single panel we have called single. To change the background we have called panel2 and as well as we have called panel. Also we have made the panel title bold by b tag and by center tag we have put it into center.
We have changed the background color of the pie chart as well as foreground color of the pie chart by adding following marked lines . After making changes into the source code click on Save to make the changes. Like this way you can change the background color of charts in XML dashboard as well.

Step 7:
Now you can see one cool dashboard is ready for presentation. You can impress your boss by making this type of custom html dashboard.



You can also download the source code of this sample dashboard by clicking the below button.


You can also know about :  How to Add Text Input option to Splunk Dashboard

Hope this has helped you in achieving the below requirement without fail:

How to Customize a Dashboard using HTML in Splunk

Happy Splunking !!

What’s your Reaction?

Spread our blog
Previous articleHow to Create Field Aliases in Splunk
Next articleLoad-balancing Splunk Search heads
Passionate content developer dedicated to producing result-oriented content, a specialist in technical and marketing niche writing!! Splunk Geek is a professional content writer with 6 years of experience and has been working for businesses of all types and sizes. It believes in offering insightful, educational, and valuable content and it's work reflects that.


Please enter your comment!
Please enter your name here