In this blog, we are going learn how we can add a YouTube video in splunk dashboard. Before proceeding further let us look at a real case scenario where we need to add the YouTube video, suppose the client have a YouTube Channel and they want to include their channel video into the Dashboard to make it look more interactive and also so that the user can navigate to their YouTube channel.
Now let’s see how we can add the video in our Dashboard, first step would be to navigate to the YouTube you want to add/embed. Then click on the share button and choose Embed as shown below:
Now copy the link you see after clicking Embed and at the last of the link change allowfullscreen to allowfullscreen=”0”, as shown below:
Now go to your dashboard and Click on Edit and then click on source.
Now, add the following XML code in your Dashboard.
<row> <panel> <title>About us</title> <html> <iframe width="560" height="315" src="https://www.youtube.com/embed/TAPoPvUjgGc" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen="0"></iframe> </html> </panel> </row>
Our YouTube video has been now embedded into our Dashboard.
In the splunk version 8 or above we have to add few more changes to our web.conf file, so that we can add the YouTube video into the Dashboard.
There are few setting that we need to add so that the method mentioned above can work. The location of web.conf file is:
$SPLUNK_HOME: It is the name of your drive where you installed splunk.
If there is no file by the name of web.conf then create one and the following stanza:
[settings] dashboard_html_allow_embeddable_content = true dashboard_html_allowed_domains = *.youtube.com
below settings are set to true by default but just to be sure we # can add these too.
dashboard_html_allow_iframes = true dashboard_html_wrap_embed = true dashboard_html_allow_inline_styles = true
If you are still facing an issue regarding how we can add a YouTube video in splunk dashboard. Feel free to Ask Doubts in the Comment Section Below and Don’t Forget to Follow us on 👍 Social Networks. Happy Splunking 😉