Dashboards & Visualizations

how to actually embed a view in an IFRAME?

wsw70
Communicator

Summary:

I use splunk in SSO-enabled mode. I am trying to embed a chart in an IFRAME. By "chart" I mean the content of the white rectangle with rounded corners :). What I get so far is the whole splunk application when using the URL of the view.

Detailed description:

Splunk docs explain how to embed a view but I fail to understand:

  • how to build a view which is similar to the one in the docs (I have dashboards which are listed in Views in manager and their XML is not at all the same as the one in the docs. In particular there are no view, module and param tags)
  • what "strip splunk chome" means in the docs, i.e. which elements should be removed to keep only the chart?

Thank you!

Tags (4)
0 Karma
1 Solution

wsw70
Communicator

I managed to find out by myself. The key word is "Advanced XML". I got the source by adding ?showsource=true to the URL of the view.

I am not sure yet what I can remove from the XML but stripping up to the module "HiddenSavedSearch" left me with only the chart.

It would be useful to have a better description of what should be removed from the XML.

View solution in original post

0 Karma

vgenovese
Splunk Employee
Splunk Employee

I updated the example in the Embed Splunk dashboard elements... documentation to better describe what Splunk chrome is (modules for displaying default header information on dashboards). Also, the sample code now shows what to strip out.

if you download and install the latest Dashboard Examples app, you can find many working examples of simple XML and advanced XML, including an example illustrating IFrames.

0 Karma

wsw70
Communicator

I managed to find out by myself. The key word is "Advanced XML". I got the source by adding ?showsource=true to the URL of the view.

I am not sure yet what I can remove from the XML but stripping up to the module "HiddenSavedSearch" left me with only the chart.

It would be useful to have a better description of what should be removed from the XML.

0 Karma
Get Updates on the Splunk Community!

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...

.conf24 | Personalize your .conf experience with Learning Paths!

Personalize your .conf24 Experience Learning paths allow you to level up your skill sets and dive deeper ...

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...