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!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...