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!

Improve Your Security Posture

Watch NowImprove Your Security PostureCustomers are at the center of everything we do at Splunk and security ...

Maximize the Value from Microsoft Defender with Splunk

 Watch NowJoin Splunk and Sens Consulting for this Security Edition Tech TalkWho should attend:  Security ...

This Week's Community Digest - Splunk Community Happenings [6.27.22]

Get the latest news and updates from the Splunk Community here! News From Splunk Answers ✍️ Splunk Answers is ...