centreon / centreon-archived

Centreon is a network, system and application monitoring tool. Centreon is the only AIOps Platform Providing Holistic Visibility to Complex IT Workflows from Cloud to Edge.
https://www.centreon.com
GNU General Public License v2.0
574 stars 240 forks source link

[21.04.0] CLAPI import / export #9884

Closed kozfelipe closed 3 years ago

kozfelipe commented 3 years ago

Hi team,

I am migrating my objects exported by CLAPI 19.04.16 to my new platform running 21.04.0.

Line 2 : Object already exists (Guest Menu)
Line 43 : Object already exists (Monitoring Menu)
Line 45 : Object not found:Poller/Remote Wizard
Line 46 : Object not found:Remote Wizard Step 2
Line 47 : Object not found:Remote Wizard Step 3
Line 48 : Object not found:Remote Wizard Final Step
Line 49 : Object not found:Poller Wizard Step 2
Line 50 : Object not found:Poller Wizard Step 3
Line 51 : Object not found:Poller Wizard Final Step
Line 133 : Object not found:Manager
Line 134 : Object not found:Plugin Packs
Line 151 : Object already exists (Guest Actions)
Line 160 : Object already exists (Monitoring Actions)
Line 168 : Unknown action:service_disacknowledgement
Line 177 : Unknown action:service_display_command
Line 181 : Unknown action:host_disacknowledgement
Line 203 : Unknown action:generate_cfg
Line 204 : Missing parameters
PHP Fatal error:  Uncaught PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'init_script' in 'field list' in /usr/share/centreon/www/class/centreonDB.class.php:275
Stack trace:
#0 /usr/share/centreon/lib/Centreon/Object/Object.php(179): CentreonDB->query('UPDATE nagios_s...', Array)
#1 /usr/share/centreon/www/class/centreon-clapi/centreonObject.class.php(365): Centreon_Object->update('1', Array)
#2 /usr/share/centreon/www/class/centreon-clapi/centreonAPI.class.php(806): CentreonClapi\CentreonObject->setparam('Central;init_sc...')
#3 /usr/share/centreon/www/class/centreon-clapi/centreonAPI.class.php(769): CentreonClapi\CentreonAPI->launchActionForImport()
#4 /usr/share/centreon/bin/centreon(196): CentreonClapi\CentreonAPI->import('/tmp/clapi-expo...')
#5 {main}
  thrown in /usr/share/centreon/www/class/centreonDB.class.php on line 275

Seems like the new db structure is different now. What should be the best way to perform this migration?

Class '\CentreonClapi\centreon' not found

should not be the right error exception here

Line 416 : Object already exists (central-broker-master)
PHP Fatal error:  Uncaught PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'config_correlation_activate' in 'field list' in /usr/share/centreon/www/class/centreonDB.class.php:275
Stack trace:
#0 /usr/share/centreon/lib/Centreon/Object/Object.php(179): CentreonDB->query('UPDATE cfg_cent...', Array)
#1 /usr/share/centreon/www/class/centreon-clapi/centreonObject.class.php(365): Centreon_Object->update('1', Array)
#2 /usr/share/centreon/www/class/centreon-clapi/centreonAPI.class.php(806): CentreonClapi\CentreonObject->setparam('central-broker-...')
#3 /usr/share/centreon/www/class/centreon-clapi/centreonAPI.class.php(769): CentreonClapi\CentreonAPI->launchActionForImport()
#4 /usr/share/centreon/bin/centreon(196): CentreonClapi\CentreonAPI->import('clapi-export.tx...')
#5 {main}
  thrown in /usr/share/centreon/www/class/centreonDB.class.php on line 275
lpinsivy commented 3 years ago

Hi @kozfelipe CLAPI will have incompatibility between major version but we used to fix a lot of issue with latest versions