Dashboards & Visualizations

Is it possible to display an external web page in Splunk like a html iframe?

nyp_kwyc
Explorer

Hi guys I am new to splunk

I am wondering is it possible to display external web page like "www.google.com" in splunk like a html iframe?

I tried html iframe:
iframe src="google.com"

But it gave me an error message - "Splunk cannot find the "google.com" view."

How do I change the link search to external web page

Thanks in advance.

Tags (4)
0 Karma
1 Solution

masonmorales
Influencer

Yes, it is possible. You need to add it within a row of the dashboard, and include HTML tags. Here's an example:

  <?xml version='1.0' encoding='utf-8'?>
<dashboard>
  <label>My Google Dashboard</label>
  <row>
    <html>
    <h2>Embedded Web Page!</h2>
       <iframe src="http://www.google.com" width="100%" height="300">&gt;</iframe>
    </html>
  </row>
  </dashboard>

View solution in original post

paramagurukarth
Builder

If you are good in html and javascript,

  1. Create your own HTML with a drop down and an iFrame
  2. Add a onchange event listener javascript method to that dropdown
  3. Based on the value of the dropdown change the src attribute of that iframe(with your dashboards URL)
  4. Now attache you a html page to any dashboard using the IFramInclude module (http://localhost:8000/en-US/modules#Splunk.Module.IFrameInclude)

Hope this helps you

0 Karma

LukeMurphey
Champion

You need to specify the protocol too (e.g. "http://google.com"). Here is a working example:

<dashboard>
  <label>test_iframe</label>
  <row>
    <panel>

          <iframe src="http://textcritical.com"/>

    </panel>
  </row>
</dashboard>

That said, your browser will likely access due to Google from an iframe because Google sets the X-Frame-Options header such that it prevents browsers from displaying google.com in a iframe (thats why I used a different domain in the example).

masonmorales
Influencer

Yes, it is possible. You need to add it within a row of the dashboard, and include HTML tags. Here's an example:

  <?xml version='1.0' encoding='utf-8'?>
<dashboard>
  <label>My Google Dashboard</label>
  <row>
    <html>
    <h2>Embedded Web Page!</h2>
       <iframe src="http://www.google.com" width="100%" height="300">&gt;</iframe>
    </html>
  </row>
  </dashboard>

sssignals
Path Finder

It works. Better use a localhost:8000 to host index.html than Google. It complains security issue.

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...