Page 1 of 1

PHP Warning: Invalid argument supplied nagiosim.inc.php

Posted: Wed Jul 11, 2018 12:33 pm
by Werner.van.Looy
Nagios XI version: 5.5.0
XI installed from: manual
XI UUID: 9c3079d1-bc3b-48a2-adbe-1cb69f3e011f
Release info: lx0102.tilburgcity.loc 3.10.0-693.17.1.el7.x86_64 x86_64
Red Hat Enterprise Linux Server release 7.4 (Maipo)
Gnome is not installed
Virtual machine on VMWare

Apache Information
PHP Version: 5.4.16
Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:61.0) Gecko/20100101 Firefox/61.0
Server Port: 443
Date/Time
PHP Timezone: Europe/Amsterdam
PHP Time: Wed, 11 Jul 2018 19:40:51 +0200
System Time: Wed, 11 Jul 2018 19:40:51 +0200

We have upgraded from 5.4.13 to 5.5.0. All looked well, but when we apply a new configuration to Nagios Core, we do not receive any errors in Nagios XI (Nagios XI itself is updated) but the configuration files for Nagios Core are not generated. When we try to apply the new config from the console, we get the following error:

--- ccm_export.php -------------------
> Writing CCM configuration to Nagios files
PHP Warning: Invalid argument supplied for foreach() in /usr/local/nagiosxi/html/includes/components/nagiosim/nagiosim.inc.php on line 491
PHP Warning: pg_set_client_encoding() expects parameter 1 to be resource, boolean given in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-postgres7.inc.php on line 255
<p><pre>SQL Error [nagiosxi] : ERROR: syntax error at or near "successMessage"
LINE 1: ...successfully written!</span><br><br><span class=\'successMes...
^</pre></p>
Finished writing out configuraton

Any idea what we can do?

Kind regards

Re: PHP Warning: Invalid argument supplied nagiosim.inc.php

Posted: Wed Jul 11, 2018 2:55 pm
by scottwilkerson
Go to Configure -> CCM -> Config File Management

Click Delete Files
Write Configs
Verify Configs

and if all looks good
Restart Nagios Core

If that doesn't go as expected, please return any errors along with the output of the following

Code: Select all

ps-ef|grep nagios.cfg

Re: PHP Warning: Invalid argument supplied nagiosim.inc.php

Posted: Wed Jul 11, 2018 3:53 pm
by Werner.van.Looy
That worked like a charm! Thank for your support.

Re: PHP Warning: Invalid argument supplied nagiosim.inc.php

Posted: Wed Jul 11, 2018 4:29 pm
by scottwilkerson
Werner.van.Looy wrote:That worked like a charm! Thank for your support.
Great! Closing