Page 1 of 1

Old Database values in ccm_config.inc.php

Posted: Tue Jan 14, 2020 12:03 pm
by TBT
I've noticed old Database values in /usr/local/nagiosxi/etc/components/ccm_config.inc.php, more specifically the server IP address.

As it's suggest not to edit manually, can you advise on where is this information modified within CCM?

Code: Select all

1 <?php
      2         /** DO NOT MANUALLY EDIT THIS FILE
      3         This file is used internally by Nagios CCM.
      4         Nagios CCM will override this file automatically with the latest settings. */
      5
      6         $CFG["plugins_directory"] = "/usr/local/nagios/libexec";
      7         $CFG["command_file"] = "/usr/local/nagios/var/rw/nagios.cmd";
      8         $CFG["default_language"] = "en";
      9
     10         // MySQL database connection info
     11         $CFG["db"] = array(
     12             "server"   => "xxx.xxx.xxx.xxx",
     13             "port"     => "3306",
     14             "database" => "nagiosqldev",
     15             "username" => "nagiosql",
     16             "password" => "n@gweb"
     17             );

Re: Old Database values in ccm_config.inc.php

Posted: Tue Jan 14, 2020 1:04 pm
by benjaminsmith
Hello @TBT,

May I ask what you are trying to change on the system and we can provide additional information?

The database settings are set in /usr/local/nagiosxi/html/config.inc.php. Typically, you might edit this file if you are changing the default passwords or offloading the database.

References:
https://assets.nagios.com/downloads/nag ... Server.pdf
https://assets.nagios.com/downloads/nag ... ios-XI.pdf

Re: Old Database values in ccm_config.inc.php

Posted: Tue Jan 14, 2020 1:58 pm
by TBT
Hello,

I am preparing for a restore/rebuild of our current installation (CentOS6) to new Hosts (Debian10 once supported) in a new virtual environment, including new off-loaded Database servers. Said config file has the old Database values, hence my question.

Re: Old Database values in ccm_config.inc.php

Posted: Tue Jan 14, 2020 2:23 pm
by benjaminsmith
Hello @TBT,

OK, thank you. That information would be found in the /usr/local/nagiosxi/html/config.inc.php. Let me know if you have any other questions.

Re: Old Database values in ccm_config.inc.php

Posted: Tue Jan 14, 2020 2:45 pm
by TBT
Okay... having said that, this test Host has changed to the new DB servers in /usr/local/nagiosxi/html/config.inc.php, yet /usr/local/nagiosxi/etc/components/ccm_config.inc.php shows the old DB server. Why's that?

Re: Old Database values in ccm_config.inc.php

Posted: Tue Jan 14, 2020 2:55 pm
by benjaminsmith
Hello @TBT,

In Nagios XI 5.6, the ccm_config.inc.php file was removed and the config.inc.php file is used for the database configuration for nagiosql.

Let us know if you have any other questions or if we may close this thread.

Re: Old Database values in ccm_config.inc.php

Posted: Tue Jan 14, 2020 3:06 pm
by TBT
Understood.

We're currently running 5.6.7, /usr/local/nagiosxi/etc/components/ccm_config.inc.php can now be deleted, correct?

If so, yes the thread may be closed.

Re: Old Database values in ccm_config.inc.php

Posted: Tue Jan 14, 2020 3:10 pm
by benjaminsmith
Hello @TBT,

Yes. As long as the server running 5.6 or greater, you can remove this file.

Re: Old Database values in ccm_config.inc.php

Posted: Tue Jan 14, 2020 3:13 pm
by TBT
It would be great if the upgrade script would clean-up old lint like this. :)

Re: Old Database values in ccm_config.inc.php

Posted: Tue Jan 14, 2020 3:16 pm
by benjaminsmith
Hello @TBT,

Good point, I will pass that along to the dev team. Appreciate the feedback.