Operation System: Centos 7.9
checkmk version 2.1.p17 and also 2.1.p16

when trying to create a map using nagvis, on the webfronted we get the error message:
> "Failed to execute ajax call. Maybe a network issue or webserver is not available. HTTP-Status-Cdoe:500,
> /mysite/nagvis/server/core/ajax_handler.php?mod=Map&act=manage&_ajaxid=1669804880

in the apache log file > /opt/omd/sites/mysite/var/log/apache/error_log, we see the error:
> Wed Nov 11 11:41:22.645532 2022] [fcgid:warn] [pid 7254] [client 127.0.0.1:59876] mod_fcgid: stderr:
> PHP Fatal error: Arrays are not allowed as constants in
> /opt/omd/versions/2.1.0p17.cee/share/nagvis/htdocs/server/core/sources/geomap.php on line 9,
> referer: http://192.168.2.99/mysite/nagvis/frontend/nagvis-js/index.php


Quick and dirty solution:
go to file: /opt/omd/versions/2.1.0p17.cee/share/nagvis/htdocs/server/core/sources/geomap.php on line 9

>> comment out line 9: const ACCEPTED_GEOMAP_SERVER_URL_SCHEMES = ["http", "https"];

>> after that it worked!!

computer2know :: thank you for your visit :: have a nice day :: © 2024