Dashboards & Visualizations

Does somebody can write steps how to add content from another site to dashboard?

C4r7m4n
Path Finder

Hello

Does somebody can write steps how to add content from another site to existing dashboard?
I have tried use steps from Documentation: http://docs.splunk.com/Documentation/Splunk/4.3.2/Developer/UseHTML#Add_an_IFrame

but it doesn't work ;(

Best Regards,
C4r7m4n

Tags (3)
0 Karma
1 Solution

MHibbin
Influencer

@C4r7m4n,

Firstly you should probably add some more XML to your view... I expect that doesn't load at all?

You should look at creating an Advanced XML here.

At a bare minimum will need to include the template for the view. But to make it look/function like other views in Splunk, you should include the "chrome" mentioned in the page I added above.

In you "module" you have not defined a panel to put the iFrame in (this would be panelLayout). The param you have used, "check_exists" is now deprecated.. as per the module reference here.

Finally, I have tried a few different sites in the iFrame, and it looks like you should use a URI (to an exact resource/page) rather than a URL. So for example http://www.google.com/ does not work, but the URI for the Splunk module reference does.

Below is the XML I wrote for testing this...

<view template="dashboard.html">
  <label>My Dashboard</label>
  <module name="AccountBar" layoutPanel="appHeader"/>
  <module name="AppBar" layoutPanel="navigationHeader"/>
  <module name="Message" layoutPanel="messaging">
    <param name="filter">*</param>
    <param name="clearOnJobDispatch">False</param>
    <param name="maxSize">1</param>
  </module>
  <module name="IFrameInclude" layoutPanel="panel_row1_col1">
    <param name="src"><![CDATA[http://docs.splunk.com/Documentation/Splunk/4.3.1/Developer/ModuleReference#IFrameInclude]]></param>
    <param name="height">402</param>
  </module>
</view>

Hope this helps answer your question.. if it does can you mark the answer as accepted to help Splunkbase know if it needs more attention/is useful.

Regards,

MHibbin

View solution in original post

C4r7m4n
Path Finder

Hello @MHibbin

Thank you for your answer, it helps me a lot.

I have successfully created view and added some sites as you described. The problem still bother me is there a way to mix this iframe with components from dashboard e.g. single value button, I mean on the one raw there is single value button and on the second one there is iframe. And second thing: Is there a way to add url, when someobdy have to domain login or just login to see some site.

Best Regards,
C4r7m4n

0 Karma

MHibbin
Influencer

@C4r7m4n,

Firstly you should probably add some more XML to your view... I expect that doesn't load at all?

You should look at creating an Advanced XML here.

At a bare minimum will need to include the template for the view. But to make it look/function like other views in Splunk, you should include the "chrome" mentioned in the page I added above.

In you "module" you have not defined a panel to put the iFrame in (this would be panelLayout). The param you have used, "check_exists" is now deprecated.. as per the module reference here.

Finally, I have tried a few different sites in the iFrame, and it looks like you should use a URI (to an exact resource/page) rather than a URL. So for example http://www.google.com/ does not work, but the URI for the Splunk module reference does.

Below is the XML I wrote for testing this...

<view template="dashboard.html">
  <label>My Dashboard</label>
  <module name="AccountBar" layoutPanel="appHeader"/>
  <module name="AppBar" layoutPanel="navigationHeader"/>
  <module name="Message" layoutPanel="messaging">
    <param name="filter">*</param>
    <param name="clearOnJobDispatch">False</param>
    <param name="maxSize">1</param>
  </module>
  <module name="IFrameInclude" layoutPanel="panel_row1_col1">
    <param name="src"><![CDATA[http://docs.splunk.com/Documentation/Splunk/4.3.1/Developer/ModuleReference#IFrameInclude]]></param>
    <param name="height">402</param>
  </module>
</view>

Hope this helps answer your question.. if it does can you mark the answer as accepted to help Splunkbase know if it needs more attention/is useful.

Regards,

MHibbin

C4r7m4n
Path Finder

Hello @MHibbin,

So i created new dashboard, removed:

\?xml version='1.0' encoding='utf-8'?\
     \dashboard>
           \label>iframe</label>
     \/dashboard>

and added this code:

\?xml version='1.0' encoding='utf-8'?\
\view
\module name="IFrameInclude"
\param name="src">google.com\/param
\param name="check_exists">True\/param
\module\
\view\

to $SPLUNK_HOME/etc/apps/search/local/data/ui/views/iframe.xml
from http://docs.splunk.com/Documentation/Splunk/latest/Developer/UseHTML#Add_an_IFrame

And now what ? 😉 Nothing happened. The google first site didn't appear in my dashboard.

Best Regards,
C4r7m4n

0 Karma

MHibbin
Influencer

It will probably help if you add in the XML you tried, and then Splunkbase users can help see if it just a error in the syntax, you may be almost there - so no need to nessecarily repeat the steps already written out in the docs.

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