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.

html1

html2

html3

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.

html4

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.

html5

html6

html15

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

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

html8

html9
Step 6:
We have written custom CSS inside style tag.
html10
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.
html11
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.

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

html14

html13

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

SourceCode

You can also know about :  How to Add Multiselect 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?
+1
+1
+1
5
+1
+1
+1
+1

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.

LEAVE A REPLY

Please enter your comment!
Please enter your name here