NagVis maps: Failed to update NagVis maps: 500

CMK version: 2.0.0p29 (CME)
OS version: CentOS 7

Error message: Failed to update NagVis maps: 500

After updating our Checkmk servers (distributed monitoring with one master and several slaves) from version 2.0.0p25 (CME) to 2.0.0p29 (CME), we are not able to see our NagVis maps in the GUI. We only get this error: “Failed to update NagVis maps: 500”.

The /omd/sites/SITE/var/log/apache/error_log shows the following entry:
[…]
PHP Fatal error: Arrays are not allowed as constants in /opt/omd/versions/2.0.0p29.cme/share/nagvis/htdocs/server/core/sources/geomap.php on line 9
[…]

The following PHP version is installed on our Checkmk server:

php --version
PHP 5.4.16 (cli) (built: Apr 1 2020 04:07:17)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies

Do I have to upgrade it? If so, what minimal version do I need?
Or is there another solution/workaround?

Thank you in advance for your help,
Antje

I was able to solve this issue.
Arrays can be declared as constant since PHP 5.6. That means, after I updated PHP to that version, the NagVis maps are displayed again properly. Even an upgrade to PHP 7.4 helps.

1 Like

Hello,

I know that this post is already resolved but maybe helpful to others which cannot install PHP 5.6.
As far as I found out this issue is only related to one line of code in the file geomap.php.

I removed the line #9:

#ACCEPTED_GEOMAP_SERVER_URL_SCHEMES = ["http", "https"];

and changed line # 283 accordingly:

if (!$url_scheme || !in_array(strtolower($url_scheme), ["http", "https"])) {

Tribe29 promise that checkmk is supported on REL7, so its not correct and not understandable why one line of code should stop NagVis.

I will file a ticket.

best regards

Michael

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact an admin if you think this should be re-opened.