Dashboards & Visualizations

embedding a youtube video in a splunk dashboard

narwhal
Splunk Employee
Splunk Employee

I am trying to embed a YouTube (an YouTube?) video iframe in a Splunk dashboard. I either get nasty errors when I save or I get a completely blank view. Any simple examples?

Tags (2)
1 Solution

sjaworski
Communicator

Give this a try. It appears Splunk does not support the allowfullscreen tag provided by default in the You Tube link. You need to give it a value.

Not supported by Splunk
<iframe width="420" height="315" src="https://www.youtube.com/embed/tAGnKpE4NCI" frameborder="0" allowfullscreen></iframe>

My modification seems to work.
<iframe width="420" height="315" src="https://www.youtube.com/embed/tAGnKpE4NCI" frameborder="0" allowfullscreen="0" ></iframe>

Note: You can remove the allowfullscreen tag all together. That is up to you.

Here is an example dashboard. All I did was create a basic Simple XML dashboard. Created a row and inserted the HTML tag and iframe. Please enjoy the music from one of my favorite bands. 🙂

<form>
  <label>Iframe Imbed</label>
  <fieldset submitButton="false" autoRun="true">
    <input type="time" token="token_time">
      <label>Select Time</label>
      <default>
        <earliest>-24h@h</earliest>
        <latest>now</latest>
      </default>
    </input>
  </fieldset>
  <row>  
    <html>
      <iframe width="420" height="315" src="https://www.youtube.com/embed/tAGnKpE4NCI" frameborder="0"  allowfullscreen="0" > </iframe>  
    </html>
  </row>
  <row>
    <panel>
      <table>
        <title>Top Sourcetype</title>
        <search>
          <query>index=_internal | top sourcetype</query>
          <earliest>$token_time.earliest$</earliest>
          <latest>$token_time.latest$</latest>
        </search>
        <option name="wrap">true</option>
        <option name="rowNumbers">false</option>
        <option name="dataOverlayMode">none</option>
        <option name="drilldown">cell</option>
        <option name="count">10</option>
      </table>
    </panel>
  </row>
</form>

View solution in original post

sjaworski
Communicator

Give this a try. It appears Splunk does not support the allowfullscreen tag provided by default in the You Tube link. You need to give it a value.

Not supported by Splunk
<iframe width="420" height="315" src="https://www.youtube.com/embed/tAGnKpE4NCI" frameborder="0" allowfullscreen></iframe>

My modification seems to work.
<iframe width="420" height="315" src="https://www.youtube.com/embed/tAGnKpE4NCI" frameborder="0" allowfullscreen="0" ></iframe>

Note: You can remove the allowfullscreen tag all together. That is up to you.

Here is an example dashboard. All I did was create a basic Simple XML dashboard. Created a row and inserted the HTML tag and iframe. Please enjoy the music from one of my favorite bands. 🙂

<form>
  <label>Iframe Imbed</label>
  <fieldset submitButton="false" autoRun="true">
    <input type="time" token="token_time">
      <label>Select Time</label>
      <default>
        <earliest>-24h@h</earliest>
        <latest>now</latest>
      </default>
    </input>
  </fieldset>
  <row>  
    <html>
      <iframe width="420" height="315" src="https://www.youtube.com/embed/tAGnKpE4NCI" frameborder="0"  allowfullscreen="0" > </iframe>  
    </html>
  </row>
  <row>
    <panel>
      <table>
        <title>Top Sourcetype</title>
        <search>
          <query>index=_internal | top sourcetype</query>
          <earliest>$token_time.earliest$</earliest>
          <latest>$token_time.latest$</latest>
        </search>
        <option name="wrap">true</option>
        <option name="rowNumbers">false</option>
        <option name="dataOverlayMode">none</option>
        <option name="drilldown">cell</option>
        <option name="count">10</option>
      </table>
    </panel>
  </row>
</form>

russellfavell
Engager

Hi @sjaworski,

Found your post while trying to embed a news feed within a Splunk dashboard. Your code almost works after I modified web.conf to allow the embedded iframe, but I get a black screen.

Don't suppose you know what needs to be updated to make it work on Splunk 8.0.4.1 please?

 

Cheers,

 

Russell

 

0 Karma
Get Updates on the Splunk Community!

October Community Champions: A Shoutout to Our Contributors!

As October comes to a close, we want to take a moment to celebrate the people who make the Splunk Community ...

Community Content Calendar, November Edition

Welcome to the November edition of our Community Spotlight! Each month, we dive into the Splunk Community to ...

Stay Connected: Your Guide to November Tech Talks, Office Hours, and Webinars!

What are Community Office Hours? Community Office Hours is an interactive 60-minute Zoom series where ...