You have already learned what chart overlay is and how to create it in a previous chapter (Chapter 6, Visualization). Now, we will see how to create custom chart overlay using a D3 extension. Basically, it is an advanced and more customized visualization option of chart overlay.
Let's look at the tabular dataset that we will use to create custom chart overlay. Later, you will learn how to implement it in the Splunk dashboard.
The following screenshot is the subset of the total dataset that we will use to visualize custom chart overlay:
The preceding dataset that has login failure, login success, and number of visitors along with time from a web server will look like the following screenshot when implemented for D3 custom chart overlay. Hovering the mouse over the chart shows the required relevant information. It also shows that behaviors can be customized from the JavaScript code of custom chart overlay:
The following are the steps to be taken in the Splunk dashboard to create a custom chart overlay visualization using D3 extension similar to one show in the preceding graph:
(Custom_Chart.js
, d3chartview.js
) and CSS (custom_chart.css
) file will be required, and they can be obtained from the Splunk app, Splunk 6.X dashboard examples, which we already used in our previous visualizations.$SPLUNK_HOMEetcappssimple_xml_examplesappserverstatic
.<dashboard script="custom_chart.js, autodiscover.js" stylesheet="custom_chart.css">
type
parameter in the preceding code.18.119.131.178