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!

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 ...