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!

Splunk Enterprise Security 8.x: The Essential Upgrade for Threat Detection, ...

 Prepare to elevate your security operations with the powerful upgrade to Splunk Enterprise Security 8.x! This ...

Get Early Access to AI Playbook Authoring: Apply for the Alpha Private Preview ...

Passionate about security automation? Apply now to our AI Playbook Authoring Alpha private preview ...

Reduce and Transform Your Firewall Data with Splunk Data Management

Managing high-volume firewall data has always been a challenge. Noisy events and verbose traffic logs often ...