Skip to content
This repository has been archived by the owner on Dec 13, 2022. It is now read-only.

Clapi error import from 18.10 to 19.04 #7730

Open
v0strik0v opened this issue Jul 24, 2019 · 11 comments
Open

Clapi error import from 18.10 to 19.04 #7730

v0strik0v opened this issue Jul 24, 2019 · 11 comments
Labels
status/more-info-needed Waiting for more information

Comments

@v0strik0v
Copy link

Versions

19.04.3

Operating System

CentOS

Description

Error with clapi while trying tu import data from 18.10 to 19.04.3

Steps to Reproduce

In ssh :
./centreon -u admin -p XXXX -i /tmp/clapi-export19.04.txt

Describe the received result

Line 2 : Object already exists (all)
Line 4 : Object not found:Poller Wizard Final Step
Line 5 : Object not found:Poller Wizard Step 3
Line 6 : Object not found:Poller Wizard Step 2
Line 7 : Object not found:Remote Wizard Final Step
Line 8 : Object not found:Remote Wizard Step 3
Line 9 : Object not found:Remote Wizard Step 2
Line 10 : Object not found:Poller/Remote Wizard
Line 21 : Object not found:Nagvis
Line 93 : Object not found:Manager
Line 94 : Object not found:Plugin pack documentation
Line 132 : Object already exists (Editeurs)
Line 144 : Object not found:Nagvis
Line 216 : Object not found:Manager
Line 217 : Object not found:Plugin pack documentation
Line 226 : Object already exists (Maintenance)
Line 238 : Object not found:Nagvis
Line 267 : Object already exists (Editeurs)
Line 275 : Unknown action:service_disacknowledgement
Line 284 : Unknown action:service_display_command
Line 288 : Unknown action:host_disacknowledgement
Line 299 : Unknown action:generate_cfg
Line 300 : Object already exists (Maintenance)
Line 306 : Unknown action:service_disacknowledgement
Line 315 : Unknown action:service_display_command
Line 319 : Unknown action:host_disacknowledgement
Line 330 : Object already exists (Simple User)
Line 360 : Object already exists (24x7)
Line 368 : Object already exists (none)
Line 369 : Object already exists (nonworkhours)
Line 377 : Object already exists (workhours)
Line 383 : Object already exists (3com)
Line 387 : Object already exists (Cisco)
Line 391 : Object already exists (Dell)
Line 395 : Object already exists (Generic)
Line 400 : Object already exists (HP)
Line 404 : Object already exists (HP-Compaq)
Line 408 : Object already exists (Linksys)
Line 412 : Object already exists (Zebra)
Line 416 : Object already exists (App-Centreon-MySQL-Partitioning)
Line 420 : Object already exists (App-DB-MySQL)
Line 424 : Object already exists (App-DB-MySQL-Database-Size)
Line 428 : Object already exists (App-DB-MySQL-Long-Queries)
Line 432 : Object already exists (App-DB-MySQL-Qcache-Hitrate)
Line 436 : Object already exists (App-DB-MySQL-Queries)
Line 440 : Object already exists (App-DB-MySQL-Sql)
Line 444 : Object already exists (App-DB-MySQL-Sql-String)
Line 448 : Object already exists (App-Monitoring-Centreon-Central-Broker-Stats)
Line 452 : Object already exists (App-Monitoring-Centreon-Host-Dummy)
Line 456 : Object already exists (App-Monitoring-Centreon-Poller-Broker-Stats)
Line 460 : Object already exists (App-Monitoring-Centreon-Service-Dummy)
Line 464 : Object already exists (base_centreon_dummy)
Line 468 : Object already exists (base_centreon_ping)
Line 472 : Object already exists (base_centreon_ping_wan)
Line 476 : Object already exists (base_host_alive)
Line 480 : Object already exists (check_apc)
Line 484 : Object already exists (check_apc_output-lines_V3)
Line 488 : Object already exists (check_centreon_dummy)
Line 492 : Object already exists (check_cisco_cpu-load_V3)
Line 496 : Object already exists (check_cisco_traffic-global_V3)
Line 500 : Object already exists (check_cisco_traffic-Id_V3)
Line 504 : Object already exists (check_cisco_uptime)
Line 508 : Object already exists (check_icmp)
Line 512 : Object already exists (check_idrac_plugin)
PHP Fatal error: Uncaught Error: Class '\CentreonClapi\centreon' not found in /usr/share/centreon/www/class/centreon-clapi/centreonAPI.class.php:934
Stack trace:
#0 /usr/share/centreon/www/class/centreon-clapi/centreonAPI.class.php(799): CentreonClapi\CentreonAPI->iniObject('-a $_HOSTAUTHPR...')
#1 /usr/share/centreon/www/class/centreon-clapi/centreonAPI.class.php(769): CentreonClapi\CentreonAPI->launchActionForImport()
#2 /usr/share/centreon/bin/centreon(200): CentreonClapi\CentreonAPI->import('/tmp/clapi-expo...')
#3 {main}
thrown in /usr/share/centreon/www/class/centreon-clapi/centreonAPI.class.php on line 934

The process is not able to create any host or service. I tried to delete the poller before the clapi command and it's created but nothing more.
I also tried to upgrade my 18.10 to 19.04 and then export but same issue...

Any idea of what's wrong ?
Thanks in advance for your help.

@lpinsivy
Copy link
Contributor

Hi @v0strik0v can you send be MP your clapi export to debug it?

Regards

@lpinsivy lpinsivy added the status/more-info-needed Waiting for more information label Jul 25, 2019
@v0strik0v
Copy link
Author

Bonjour,

Je ne trouve pas d'option pour les messages perso.. :)

@lpinsivy
Copy link
Contributor

You can contact me 'Laurent' on Centreon slack community: http://centreon.github.io

@StefThomas
Copy link
Contributor

TL;DR : l’export Centreon ajoute un saut de lignes dans la définition de certaines commandes.

J’ai la même erreur, j’ai ouvert un ticket au support commercial (#81393). Le problème est à priori à l’export, qui rajoute des sauts de ligne sur certaines commandes. Regardez dans un fichier exporté (qui contient des commandes) s’il n’y a pas des lignes qui commencent par autre chose qu’un type d’objet Centreon (HTPL,STPL,CMD, etc…). Moi j’ai des lignes qui commencent par "--option-de-la-commande" qui suivent directement la ligne qui commence par "CMD;". J’ai vérifié, le saut de ligne n’est pas dans la définition de la commande (il s’agit d’une commande issu de l’EPP dans mon cas…).

J’ai retiré ces sauts de lignes illégitimes et là l’import se déroule sans problème.

@lpinsivy
Copy link
Contributor

merci @StefThomas du retour

@StefThomas
Copy link
Contributor

Par ailleurs (m’enfin ça concerne aussi l’import/export) : max_connection=250 dans la section [server] de MariaDB ça ne suffit pas, je l’ai poussé à 1024 perso…

@v0strik0v
Copy link
Author

Merci pour votre retour. Hélas, je n'ai pas de saut de ligne dans mon fichier de configuration.
Y a t-il un moyen de faire un export que je puisse passer via clapi en ssh éventuellement ?
Merci d'avance !

@StefThomas
Copy link
Contributor

StefThomas commented Aug 21, 2019 via email

@v0strik0v
Copy link
Author

J'ai remarqué que dans le fichier exporté, Il arrive parfois que des nom d'hôtes soient insérés en début de ligne avant le paramètre HOST;ADD. C'est cela qui fait planter mon import :

HOST;setparam;S-XXX-XXXX;host_activate;1
F-XXX-XXXHOST;ADD;S-CAI-4949;Serveur du Caire;192.168.XXX;;Central;
HOST;setparam;S-CAI-4949;host_active_checks_enabled;2
HOST;setparam;S-CAI-4949;host_passive_checks_enabled;2
HOST;setparam;S-CAI-4949;host_checks_enabled;2
......
F-CAI-XXXXHOST;ADD;S-BZV-SRV16;S-BZV-SRV16;192.168.XXX;;Central;
HOST;setparam;S-BZV-SRV16;check_period;24x7

@StefThomas
Copy link
Contributor

StefThomas commented Aug 21, 2019 via email

@StefThomas
Copy link
Contributor

En fait je fait référence à #7783 dans mon dernier message.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status/more-info-needed Waiting for more information
Projects
None yet
Development

No branches or pull requests

3 participants