Spread our blog

How to Customize a Table using HTML in Splunk

Hi Guys !!

Hope you are enjoyed the previous posts in Dashboard Section. Today we have come with a new idea. Often we create table in the dashboard for visualizing the data. Have you thought that a simple table can be done more attractive using HTML . This is very easy to implement in Splunk. Follow the below steps to customize a table using HTML.  

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

index=_internal sourcetype=splunkd_ui_access | stats count by method,status.

Also we have given the dashboard name as Table 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 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.

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 Table 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 change into the following marked portions.


Step 6:
We have written custom CSS inside style tag. Here we have used table,tr,td to customize the table. We have given the border color as solid red  by border attribute and also put all the values in the center by text-align attribute.


We have called custom CSS inside the div tag. For dashboard name we have called dashboard . To change the background we have called panel2 . After making changes into the source code click on Save to make the changes.


Step 7:
Now you can see one cool table has been created. Also we have given the borders as red and put the field names and field values in the center.


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


You can also know about :  Splunk Child Elements: Set and Unset

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

How to Customize a Table using HTML in Splunk


Happy Splunking !!

What’s your Reaction?

Spread our blog
Previous articleLoad-balancing Splunk Search heads
Next articleAbout Splunk Users and Roles
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