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!

Index This | What is broken 80% of the time by February?

December 2025 Edition   Hayyy Splunk Education Enthusiasts and the Eternally Curious!    We’re back with this ...

Unlock Faster Time-to-Value on Edge and Ingest Processor with New SPL2 Pipeline ...

Hello Splunk Community,   We're thrilled to share an exciting update that will help you manage your data more ...

Splunk MCP & Agentic AI: Machine Data Without Limits

Discover how the Splunk Model Context Protocol (MCP) Server can revolutionize the way your organization uses ...