Page 1 of 2

Upgrade 5.6.7 to 5.7.5 Importing into the CCM failed!

Posted: Tue Dec 01, 2020 2:32 pm
by TBT
While testing a manual upgrade (via terminal) of XI 5.6.7 to 5.7.5 we received an error "Importing into the CCM failed! message."

Below is the output.

Code: Select all

--- ccm_import.php -------------------
> Setting import directory: /usr/local/nagios/etc/import/
> Importing config files into the CCM
  - Importing: /usr/local/nagios/etc/import/configwizard-bpiwizard.cfg .. SUCCESS
  - Importing: /usr/local/nagios/etc/import/configwizard-capacity-planning.cfg .. SUCCESS
  - Importing: /usr/local/nagios/etc/import/configwizard-check_sla.cfg .. SUCCESS
  - Importing: /usr/local/nagios/etc/import/configwizard-check_xi_deface.cfg .. SUCCESS
  - Importing: /usr/local/nagios/etc/import/configwizard-dnsquery.cfg .. SUCCESS
  - Importing: /usr/local/nagios/etc/import/configwizard-docker.cfg .. SUCCESS
  - Importing: /usr/local/nagios/etc/import/configwizard-domain_expiration.cfg .. SUCCESS
  - Importing: /usr/local/nagios/etc/import/configwizard-ec2.cfg .. SUCCESS
  - Importing: /usr/local/nagios/etc/import/configwizard-email-delivery.cfg .. SUCCESS
  - Importing: /usr/local/nagios/etc/import/configwizard-exchange.cfg .. SUCCESS
  - Importing: /usr/local/nagios/etc/import/configwizard-folder_watch.cfg .. SUCCESS
  - Importing: /usr/local/nagios/etc/import/configwizard-ftpserver.cfg .. SUCCESS
  - Importing: /usr/local/nagios/etc/import/configwizard-hyperv.cfg .. SUCCESS
  - Importing: /usr/local/nagios/etc/import/configwizard-java_as.cfg .. SUCCESS
  - Importing: /usr/local/nagios/etc/import/configwizard-json.cfg .. SUCCESS
  - Importing: /usr/local/nagios/etc/import/configwizard-ldapserver.cfg .. SUCCESS
  - Importing: /usr/local/nagios/etc/import/configwizard-linux-server.cfg .. SUCCESS
  - Importing: /usr/local/nagios/etc/import/configwizard-linuxsnmp.cfg .. SUCCESS
  - Importing: /usr/local/nagios/etc/import/configwizard-mailserver.cfg .. SUCCESS
  - Importing: /usr/local/nagios/etc/import/configwizard-mongodb_database.cfg .. SUCCESS
  - Importing: /usr/local/nagios/etc/import/configwizard-mongodb_server.cfg .. SUCCESS
  - Importing: /usr/local/nagios/etc/import/configwizard-mountpoint.cfg .. SUCCESS
  - Importing: /usr/local/nagios/etc/import/configwizard-mssql_server.cfg .. SUCCESS
  - Importing: /usr/local/nagios/etc/import/configwizard-mssqldatabase.cfg .. SUCCESS
  - Importing: /usr/local/nagios/etc/import/configwizard-mssqlquery.cfg .. SUCCESS
  - Importing: /usr/local/nagios/etc/import/configwizard-mysqlquery.cfg .. SUCCESS
  - Importing: /usr/local/nagios/etc/import/configwizard-mysqlserver.cfg .. SUCCESS
  - Importing: /usr/local/nagios/etc/import/configwizard-nagioslogserver.cfg .. SUCCESS
  - Importing: /usr/local/nagios/etc/import/configwizard-nagiostats.cfg .. SUCCESS
  - Importing: /usr/local/nagios/etc/import/configwizard-nagiosxiserver.cfg .. SUCCESS
  - Importing: /usr/local/nagios/etc/import/configwizard-ncpa_agent.cfg .. SUCCESS
  - Importing: /usr/local/nagios/etc/import/configwizard-nna.cfg .. SUCCESS
  - Importing: /usr/local/nagios/etc/import/configwizard-nsclient.cfg .. ERROR
   Field 'service_description' doesn't have a default value<span class="greenmessage">Entry name::xiwizard_bpi_host inside tbl_hosttemplate successfully inserted</span><br><span class="greenmessage">Entry name::xiwizard_bpi_service inside tbl_servicetemplate successfully inserted</span><br><span class="greenmessage">Entry command_name::check_bpi inside tbl_command successfully inserted</span><br><span class="greenmessage">Entry command_name::check_capacity_planning inside tbl_command successfully inserted</span><br><span class="greenmessage">Entry name::xiwizard_check_sla2 inside tbl_servicetemplate successfully inserted</span><br><span class="greenmessage">Entry command_name::check_xi_sla2 inside tbl_command successfully inserted</span><br><span class="greenmessage">Entry name::xiwizard_check_deface_host inside tbl_hosttemplate successfully inserted</span><br><span class="greenmessage">Entry name::xiwizard_check_deface_service inside tbl_servicetemplate successfully inserted</span><br><span class="greenmessage">Entry command_name::check_xi_deface inside tbl_command successfully inserted</span><br><span class="greenmessage">Entry command_name::check_xi_service_dnsquery inside tbl_command successfully inserted</span><br><span class="greenmessage">Entry name::xiwizard_dnsquery_host inside tbl_hosttemplate successfully inserted</span><br><span class="greenmessage">Entry name::xiwizard_dnsquery_service inside tbl_servicetemplate successfully inserted</span><br><span class="greenmessage">Entry command_name::check_docker inside tbl_command successfully inserted</span><br><span class="greenmessage">Entry name::xiwizard_domain_expiration_host_v2 inside tbl_hosttemplate successfully inserted</span><br><span class="greenmessage">Entry name::xiwizard_domain_expiration_service_v2 inside tbl_servicetemplate successfully inserted</span><br><span class="greenmessage">Entry command_name::check_xi_domain_v2 inside tbl_command successfully inserted</span><br><span class="greenmessage">Entry name::xiwizard_ec2_host inside tbl_hosttemplate successfully inserted</span><br><span class="greenmessage">Entry name::xiwizard_ec2_service inside tbl_servicetemplate successfully inserted</span><br><span class="greenmessage">Entry command_name::check_ec2 inside tbl_command successfully inserted</span><br><span class="greenmessage">Entry command_name::check_email_delivery inside tbl_command successfully inserted</span><br><span class="greenmessage">Entry name::xiwizard_exchange_host inside tbl_hosttemplate successfully inserted</span><br><span class="greenmessage">Entry name::xiwizard_exchange_ping_service inside tbl_servicetemplate successfully inserted</span><br><span class="greenmessage">Entry name::xiwizard_exchange_service inside tbl_servicetemplate successfully inserted</span><br><span class="greenmessage">Entry command_name::check_exchange_rbl inside tbl_command successfully inserted</span><br><span class="greenmessage">Entry name::xiwizard_check_file_service inside tbl_servicetemplate successfully inserted</span><br><span class="greenmessage">Entry command_name::check_file_service inside tbl_command successfully inserted</span><br><span class="greenmessage">Entry name::xiwizard_check_file_sa_service inside tbl_servicetemplate successfully inserted</span><br><span class="greenmessage">Entry command_name::check_file_size_age inside tbl_command successfully inserted</span><br><span class="greenmessage">Entry command_name::check_ftp_fully inside tbl_command successfully inserted</span><br><span class="greenmessage">Entry name::xiwizard_ftpserver_host inside tbl_hosttemplate successfully inserted</span><br><span class="greenmessage">Entry name::xiwizard_ftpserver_transfer_service inside tbl_servicetemplate successfully inserted</span><br><span class="greenmessage">Entry name::xiwizard_ftpserver_server_service inside tbl_servicetemplate successfully inserted</span><br><span class="greenmessage">Entry command_name::check_xi_hyperv inside tbl_command successfully inserted</span><br><span class="greenmessage">Entry name::xiwizard_java_as_host inside tbl_hosttemplate successfully inserted</span><br><span class="greenmessage">Entry name::xiwizard_java_as_service inside tbl_servicetemplate successfully inserted</span><br><span class="greenmessage">Entry command_name::check_xi_java_as inside tbl_command successfully inserted</span><br><span class="greenmessage">Entry name::xiwizard_java_weblogic_service inside tbl_servicetemplate successfully inserted</span><br><span class="greenmessage">Entry command_name::check_xi_java_weblogic inside tbl_command successfully inserted</span><br>Entry name::xiwizard_json_host inside tbl_hosttemplate could not be inserted: 1<br>Entry name::xiwizard_json_service inside tbl_servicetemplate could not be inserted: 1<br><span class="greenmessage">Entry command_name::check_json inside tbl_command successfully inserted</span><br><span class="greenmessage">Entry command_name::check_xi_service_ldap inside tbl_command successfully inserted</span><br><span class="greenmessage">Entry name::xiwizard_ldapserver_host inside tbl_hosttemplate successfully inserted</span><br><span class="greenmessage">Entry name::xiwizard_ldapserver_ldap_service inside tbl_servicetemplate successfully inserted</span><br><span class="greenmessage">Entry command_name::check_xi_service_snmp_linux_load inside tbl_command successfully inserted</span><br><span class="greenmessage">Entry command_name::check_xi_service_snmp_linux_process inside tbl_command successfully inserted</span><br><span class="greenmessage">Entry command_name::check_xi_service_snmp_linux_storage inside tbl_command successfully inserted</span><br><span class="greenmessage">Entry name::xiwizard_linuxsnmp_host inside tbl_hosttemplate successfully inserted</span><br><span class="greenmessage">Entry name::xiwizard_linuxsnmp_load inside tbl_servicetemplate successfully inserted</span><br><span class="greenmessage">Entry name::xiwizard_linuxsnmp_process inside tbl_servicetemplate successfully inserted</span><br><span class="greenmessage">Entry name::xiwizard_linuxsnmp_storage inside tbl_servicetemplate successfully inserted</span><br><span class="greenmessage">Entry name::xiwizard_mailserver_host inside tbl_hosttemplate successfully inserted</span><br><span class="greenmessage">Entry name::xiwizard_mailserver_ping_service inside tbl_servicetemplate successfully inserted</span><br><span class="greenmessage">Entry name::xiwizard_mailserver_service inside tbl_servicetemplate successfully inserted</span><br><span class="greenmessage">Entry command_name::check_mailserver_rbl inside tbl_command successfully inserted</span><br><span class="greenmessage">Entry name::xiwizard_mongodbdatabase_host inside tbl_hosttemplate successfully inserted</span><br><span class="greenmessage">Entry name::xiwizard_mongodbdatabase_service inside tbl_servicetemplate successfully inserted</span><br><span class="greenmessage">Entry command_name::check_mongodb_database inside tbl_command successfully inserted</span><br><span class="greenmessage">Entry name::xiwizard_mongodbserver_host inside tbl_hosttemplate successfully inserted</span><br><span class="greenmessage">Entry name::xiwizard_mongodbserver_service inside tbl_servicetemplate successfully inserted</span><br><span class="greenmessage">Entry command_name::check_mongodb_server inside tbl_command successfully inserted</span><br><span class="greenmessage">Entry name::xiwizard_mountpoint_check inside tbl_servicetemplate successfully inserted</span><br><span class="greenmessage">Entry name::xiwizard_mountpoint_check_table inside tbl_servicetemplate successfully inserted</span><br><span class="greenmessage">Entry command_name::check_mountpoint inside tbl_command successfully inserted</span><br><span class="greenmessage">Entry name::xiwizard_mssqlserver_host inside tbl_hosttemplate successfully inserted</span><br><span class="greenmessage">Entry name::xiwizard_mssqlserver_service inside tbl_servicetemplate successfully inserted</span><br><span class="greenmessage">Entry command_name::check_xi_mssql_server2 inside tbl_command successfully inserted</span><br><span class="greenmessage">Entry name::xiwizard_mssqldatabase_host inside tbl_hosttemplate successfully inserted</span><br><span class="greenmessage">Entry name::xiwizard_mssqldatabase_service inside tbl_servicetemplate successfully inserted</span><br><span class="greenmessage">Entry command_name::check_xi_mssql_database2 inside tbl_command successfully inserted</span><br><span class="greenmessage">Entry name::xiwizard_mssqlquery_host inside tbl_hosttemplate successfully inserted</span><br><span class="greenmessage">Entry name::xiwizard_mssqlquery_service inside tbl_servicetemplate successfully inserted</span><br><span class="greenmessage">Entry command_name::check_xi_mssql_query inside tbl_command successfully inserted</span><br><span class="greenmessage">Entry name::xiwizard_mysqlquery_host inside tbl_hosttemplate successfully inserted</span><br><span class="greenmessage">Entry name::xiwizard_mysqlquery_service inside tbl_servicetemplate successfully inserted</span><br><span class="greenmessage">Entry command_name::check_xi_mysql_query inside tbl_command successfully inserted</span><br><span class="greenmessage">Entry name::xiwizard_mysqlserver_host inside tbl_hosttemplate successfully inserted</span><br><span class="greenmessage">Entry name::xiwizard_mysqlserver_service inside tbl_servicetemplate successfully inserted</span><br><span class="greenmessage">Entry command_name::check_xi_mysql_health inside tbl_command successfully inserted</span><br><span class="greenmessage">Entry command_name::check_xi_service_nagioslogserver inside tbl_command successfully inserted</span><br><span class="greenmessage">Entry name::xiwizard_nagioslogserver_host inside tbl_hosttemplate successfully inserted</span><br><span class="greenmessage">Entry name::xiwizard_nagioslogserver_service inside tbl_servicetemplate successfully inserted</span><br><span class="greenmessage">Entry name::xiwizard_nagiostats_service inside tbl_servicetemplate successfully inserted</span><br><span class="greenmessage">Entry command_name::check_nagiosxi_performance inside tbl_command successfully inserted</span><br><span class="greenmessage">Entry name::xiwizard_nagiosxiserver_host inside tbl_hosttemplate successfully inserted</span><br><span class="greenmessage">Entry name::xiwizard_nagiosxiserver_service inside tbl_servicetemplate successfully inserted</span><br><span class="greenmessage">Entry name::xiwizard_nagiosxiserver_http_service inside tbl_servicetemplate successfully inserted</span><br><span class="greenmessage">Entry name::xiwizard_nagiosxiserver_ping_service inside tbl_servicetemplate successfully inserted</span><br><span class="greenmessage">Entry command_name::check_xi_nagiosxiserver inside tbl_command successfully inserted</span><br><span class="greenmessage">Entry name::xiwizard_ncpa_host inside tbl_hosttemplate successfully inserted</span><br><span class="greenmessage">Entry name::xiwizard_ncpa_service inside tbl_servicetemplate successfully inserted</span><br><span class="greenmessage">Entry command_name::check_xi_ncpa inside tbl_command successfully inserted</span><br><span class="greenmessage">Entry name::xiwizard_nna_host inside tbl_hosttemplate successfully inserted</span><br><span class="greenmessage">Entry name::xiwizard_nna_service inside tbl_servicetemplate successfully inserted</span><br><span class="greenmessage">Entry command_name::check_xi_nna inside tbl_command successfully inserted</span><br><span class="greenmessage">Entry command_name::check_xi_service_nsclient inside tbl_command successfully inserted</span><br>Entry name::xiwizard_nsclient_host inside tbl_hosttemplate could not be inserted: 1<br>Entry name::xiwizard_nsclient_ping_service inside tbl_servicetemplate could not be inserted: 1<br>Entry name::xiwizard_nsclient_service inside tbl_servicetemplate could not be inserted: 1<br>
  - Importing: /usr/local/nagios/etc/import/configwizard-oraclequery.cfg .. SUCCESS
  - Importing: /usr/local/nagios/etc/import/configwizard-oracleserverspace.cfg .. SUCCESS
  - Importing: /usr/local/nagios/etc/import/configwizard-oracletablespace.cfg .. SUCCESS
  - Importing: /usr/local/nagios/etc/import/configwizard-passivecheck.cfg .. SUCCESS
  - Importing: /usr/local/nagios/etc/import/configwizard-passiveobject.cfg .. SUCCESS
  - Importing: /usr/local/nagios/etc/import/configwizard-postgresdb.cfg .. SUCCESS
  - Importing: /usr/local/nagios/etc/import/configwizard-postgresquery.cfg .. SUCCESS
  - Importing: /usr/local/nagios/etc/import/configwizard-postgresserver.cfg .. SUCCESS
  - Importing: /usr/local/nagios/etc/import/configwizard-radiusserver.cfg .. SUCCESS
  - Importing: /usr/local/nagios/etc/import/configwizard-s3.cfg .. SUCCESS
  - Importing: /usr/local/nagios/etc/import/configwizard-snmptrap.cfg .. SUCCESS
  - Importing: /usr/local/nagios/etc/import/configwizard-solaris.cfg .. SUCCESS
  - Importing: /usr/local/nagios/etc/import/configwizard-sshproxy.cfg .. SUCCESS
  - Importing: /usr/local/nagios/etc/import/configwizard-switch.cfg .. SUCCESS
  - Importing: /usr/local/nagios/etc/import/configwizard-tftp.cfg .. SUCCESS
  - Importing: /usr/local/nagios/etc/import/configwizard-vmware.cfg .. SUCCESS
  - Importing: /usr/local/nagios/etc/import/configwizard-watchguard.cfg .. SUCCESS
  - Importing: /usr/local/nagios/etc/import/configwizard-websensor.cfg .. SUCCESS
  - Importing: /usr/local/nagios/etc/import/configwizard-websiteurl.cfg .. SUCCESS
  - Importing: /usr/local/nagios/etc/import/configwizard-windowssnmp.cfg .. SUCCESS
  - Importing: /usr/local/nagios/etc/import/configwizard-windowswmi.cfg .. SUCCESS
  - Importing: /usr/local/nagios/etc/import/configwizard-xml.cfg .. SUCCESS
  - Importing: /usr/local/nagios/etc/import/xi_timeperiod_24x7.cfg .. SUCCESS
--------------------------------------

Importing into the CCM failed!
This appears to be caused by a failure to import on the NSClient. There is a configwizard-nsclient.cfg in the /usr/local/nagios/etc/import/ directory currently.

Also, I compared the list of Configuration Wizards on this 5.7.5 XI Host vs a 5.6.7 XI Host. The upgraded host now has a Wizard named "NSClient++" which appears deprecated, where as the 5.6.7 host do not have this Wizard. So I'm unsure why it was imported to begin with.




Update 1: Another issue discovered when attempting to add a test for monitoring results in the following error. A quick Google search indicates the previous failure may cause this too.

Code: Select all

Domain Expiration Monitoring Wizard

Backend login to the Core Config Manager failed.

Configuration Error

An error occurred while attempting to apply your configuration to the monitoring engine. Contact your Nagios administrator if this problem persists.

This upgrade was ran on Dev in an effort to upgrade our Prod environment in the near future, I'm looking to make the transition smooth as possible.

Please advise on the issue above along with any other known gotchas, thank you.

Re: Upgrade 5.6.7 to 5.7.5 Importing into the CCM failed!

Posted: Wed Dec 02, 2020 2:32 pm
by ssax
Please attach the full upgrade.log from the directory you ran ./upgrade from if you have it so that we can see everything that occurred. Some things failing at the very top affect things way down the line and it can be helpful in debugging.

Please PM me a copy of your profile from the upgraded system, you can download it from Admin > System Profile by clicking the Download Profile button.

What is the output of these commands?

Code: Select all

rpm -qa | grep -i maria
rpm -qa | grep -i mysql
rpm -qa | grep php-
mysql -h 127.0.0.1 -uroot -pnagiosxi nagiosql -e "show create table tbl_servicetemplate;"
mysql -h 127.0.0.1 -uroot -pnagiosxi nagiosql -e "show create table tbl_hosttemplate;"
mysql -h 127.0.0.1 -uroot -pnagiosxi nagiosql -e "SELECT @@SQL_MODE, @@GLOBAL.SQL_MODE \G;"
The NSClient++ wizard is a new wizard (but still deprecated) in 5.7+ because development changed the Windows Server/Windows Desktop wizards to use NCPA now in XI 5.7+.

Please run this tail command (and leave it running):

Code: Select all

tail -F /usr/local/nagiosxi/var/cmdsubsys.log
Then try to apply configuration through the web interface and once it completes/errors send me the full output from the tail command above.

Re: Upgrade 5.6.7 to 5.7.5 Importing into the CCM failed!

Posted: Wed Dec 02, 2020 3:40 pm
by TBT
PM sent with an attachment containing all information as requested. Thank you.

Re: Upgrade 5.6.7 to 5.7.5 Importing into the CCM failed!

Posted: Wed Dec 02, 2020 4:44 pm
by ssax
It looks like you're missing some DB updates from a while ago.

Please run these commands:

Code: Select all

mysql -h 127.0.0.1 -uroot -pnagiosxi nagiosql -e "ALTER TABLE tbl_hosttemplate MODIFY COLUMN template_name varchar(255) NOT NULL DEFAULT '';"
mysql -h 127.0.0.1 -uroot -pnagiosxi nagiosql -e "ALTER TABLE tbl_servicetemplate MODIFY COLUMN service_description varchar(255) NOT NULL DEFAULT '';"
mysql -h 127.0.0.1 -uroot -pnagiosxi nagiosql -e "ALTER TABLE tbl_hosttemplate MODIFY COLUMN alias varchar(255) NOT NULL DEFAULT '';"
mysql -h 127.0.0.1 -uroot -pnagiosxi nagiosql -e "ALTER TABLE tbl_servicetemplate MODIFY COLUMN display_name varchar(255) NOT NULL DEFAULT '';"
Then see if that resolves it by applying configuration.

Re: Upgrade 5.6.7 to 5.7.5 Importing into the CCM failed!

Posted: Fri Dec 04, 2020 1:29 pm
by TBT
Did these Database updates occur prior to 5.6.7, if so, should we be making that change to all our current XI 5.6.7 production hosts now?

Back to the upgrade issue. We ran these commands as per your suggestion. A configuration change was then applied resulting in the same behavior.

"Backend login to the Core Config Manager failed."

Re: Upgrade 5.6.7 to 5.7.5 Importing into the CCM failed!

Posted: Mon Dec 07, 2020 4:14 pm
by ssax
Yes, they would have occurred prior to 5.6.7. If you aren't experiencing the issue on those other systems it's not required.

Please run this tail command as root (and leave it running):

Code: Select all

tail -Fn0 /usr/local/nagiosxi/var/cmdsubsys.log /var/log/httpd/error_log /var/log/httpd/ssl_error_log
Then try to apply configuration through the web interface and once it completes/errors send me the full output from the tail command above.

Re: Upgrade 5.6.7 to 5.7.5 Importing into the CCM failed!

Posted: Tue Dec 08, 2020 9:21 am
by TBT
Log output sent as per your request. Thank you.

Re: Upgrade 5.6.7 to 5.7.5 Importing into the CCM failed!

Posted: Tue Dec 08, 2020 7:26 pm
by ssax
What is the output of these commands?

Code: Select all

mysql -h 127.0.0.1 -uroot -pnagiosxi nagiosql -e "SELECT @@SQL_MODE, @@GLOBAL.SQL_MODE \G;"
mysql -h 127.0.0.1 -uroot -pnagiosxi nagiosql -e "show create table tbl_servicetemplate;"

Re: Upgrade 5.6.7 to 5.7.5 Importing into the CCM failed!

Posted: Wed Dec 09, 2020 12:18 pm
by TBT
MySQL output sent.

Re: Upgrade 5.6.7 to 5.7.5 Importing into the CCM failed!

Posted: Wed Dec 09, 2020 12:28 pm
by ssax
Please follow this guide and set sql_mode="" in your /etc/my.cnf under the [mysqld] section, it's required:

https://support.nagios.com/kb/article/n ... s-780.html

Once you've done that and restart the mariadb/mysqld service please try upgrading again.

If that doesn't resolve it, include the output of this command as well:

Code: Select all

rpm -qa | grep -i postgre