I created a map of all my switchs on ZABBIX, I istalled grafana to show metrics from zabbix, I created a dashbord for each switch, it’s great, but I want to display my map on grafa, and when i click on a switch i have access to its dashbord
Hi! You can display your map in grafana using Grafana’s Text panel. Set mode to html and use your map url as image src, for instance: <img src="http://zabbix.grafana-zabbix.org/map.php?noedit=1&sysmapid=1&width=&height=&curtime=1495181459&severity_min=0">
Or use markdown: ![mymap](http://zabbix.grafana-zabbix.org/map.php?noedit=1&sysmapid=1&width=&height=&curtime=1495181459&severity_min=0)
Unfortunately, Zabbix uses additional html layer with inks over png image and you cannot just click on the map and redirect to the particular address. You can only use links in panel drildown. or in panel description.
But also you can use this trick. Open your map in zabbix. Open browser dev tools and use selection tool to select map element. Then copy <div class="map-container"... element and past it into Text panel. Find <img> tag and add your zabbix server address to src: src="map.php?... -> src="http://zabbix.grafana-zabbix.org/map.php?...
Done!
I have been able to display a zabbix map in grafana but it seem the maps are not being refreshed automatically. I have set refesh at zabbix user level + refresh on dashbaord level . Still same…no referesh is hapenning.
We had similar issue pulling into our internal Wiki, once upgrading to Zabbix 3.4 (last month) we obviously broke the wget png file we were using from our Zabbix host(s). One of our in house guys wrote a quick script using js that we run from cron to pull maps every 5 minutes. Parsing the svg and creating the png to present within the wiki. I’m new to the Grafana community but would be happy to share if if requested - possibly a starting point to get a feature integration into the plugin?
FWIW I have been using crontab with a Phantomjs script to take a screenshot of the zabbix map(s), crop the image and save to a png file. Then use Grafana’s html text panel to display the image file created.
To enable unsafe javascript execution in text panels enable the settings disable_sanitize_html under the section [panels] in your Grafana ini file, or set env variable GF_PANELS_DISABLE_SANITIZE_HTML=true.
After upgrading my Zabbix to 4.0, my map stopped showing in Grafana. Is there any solution? I am using Grafana version 6.1.6 with the plugin version 3.10.5.