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!

Splunk Mobile: Your Brand-New Home Screen

Meet Your New Mobile Hub  Hello Splunk Community!  Staying connected to your data—no matter where you are—is ...

Introducing Value Insights (Beta): Understand the Business Impact your organization ...

Real progress on your strategic priorities starts with knowing the business outcomes your teams are delivering ...

Enterprise Security (ES) Essentials 8.3 is Now GA — Smarter Detections, Faster ...

As of today, Enterprise Security (ES) Essentials 8.3 is now generally available, helping SOC teams simplify ...