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!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...