External URL in Dashboards

External URL in Dashboard

Set up your dashlet
If you enter an external URL in the custom URL dashlet and embed it as an iFrame, you’re guaranteed to get a content-blocked error message. But if you enter the address of the checkmk server itself, e.g. https://yourCMKserverIP, you will see the Apache-Server default site.

The workaround: Just create a HTML file in the document root of the Apache server with the following content, for example:
nano /var/www/html/mycustomframe.html

<iframe src="https://www.checkmk.de" width="800" height="600">

for the moment it works just with fixed width&height perhaps anybody has more knowledge to make it responsive.

And in the Custom-URL-Dashlet you enter https://yourCMKserverIP/mycustomframe.html as URL and activate the iFrame option

That was it

2 Likes

For all defined external sites, your web server should have a way of establishing specific Content-Security-Policy headers to allow those sites.

Hi
I am open for new approaches and if you know how to realize it, please post the solution here.

This is just my workaround till now :wink:

In your etc/apache/conf.d/security.conf

In the IfModule mod_headers.c section.

Header always set Content-Security-Policy  .... ; frame-ancestors 'self' www.checkmk.de; ....

Worst case child-src 'self' www.checkmk.de

2 Likes

Does the option still work in version 2.1.0? Somehow I completely ignore this…

We upgraded to 2.1.0 and we can still pull in content (by iframe) into our portal. So, yes.

Hello, I am trying to do it as you say and it does not let me giving an error and that I have configured both with iframe and reverse proxy has changed? if so could you provide me that data have changed. Best regards

I’m thinking maybe I need more information about what error you’re getting (??).

As long as the site you are trying to embed in the iframe has CSP allowances defined for its content to allow it to be embedded, it should work.

1 Like

Hi, I have solved the problem, I will document it later in case someone needs it for their projects. Best regards

1 Like

Would be nice … :face_with_monocle: