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

1 Like

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

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

1 Like