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

Problem with host dependencies in CLAPI export #7562

Open
thezipman opened this issue May 27, 2019 · 4 comments
Open

Problem with host dependencies in CLAPI export #7562

thezipman opened this issue May 27, 2019 · 4 comments

Comments

@thezipman
Copy link

thezipman commented May 27, 2019

On Centreon 19.04 if I export the configuration I get an uncorrect export file
I used the same command I used with all previous versions of Centreon:

centreon -u admin -p password -e > /var/tmp/backup.clapi

The file is created correctly, but in the "HOST section" all the host entries that have dependencies are exported incorrectly.
The following is an extract of the export. For example the host webmailnw.domain.local-DR is a child of the host nwdrs07v.domain.local and as you can see the parent host is reported at the beginning of the "HOST;ADD;" clause of the next host item.

The correct export should have been:

HOST;addparent;webmailnw.domain.local-DR;nwdrs07v.domain.local

I noticed it today, but all the exports done with 19.04 presents the same bug, at least since 14/05/2019 (the date of the migration to the new platform).

On the previous 2.28 everything was fine.

...
HOST;ADD;webmailnw.domain.local-DR;webmailnw.domain.local-DR;10.108.2.235;;Central;
HOST;setparam;webmailnw.domain.local-DR;host_active_checks_enabled;2
HOST;setparam;webmailnw.domain.local-DR;host_passive_checks_enabled;2
HOST;setparam;webmailnw.domain.local-DR;host_checks_enabled;2
HOST;setparam;webmailnw.domain.local-DR;host_obsess_over_host;2
HOST;setparam;webmailnw.domain.local-DR;host_check_freshness;2
HOST;setparam;webmailnw.domain.local-DR;host_event_handler_enabled;2
HOST;setparam;webmailnw.domain.local-DR;host_flap_detection_enabled;2
HOST;setparam;webmailnw.domain.local-DR;host_process_perf_data;2
HOST;setparam;webmailnw.domain.local-DR;host_retain_status_information;2
HOST;setparam;webmailnw.domain.local-DR;host_retain_nonstatus_information;2
HOST;setparam;webmailnw.domain.local-DR;host_notifications_enabled;2
HOST;setparam;webmailnw.domain.local-DR;contact_additive_inheritance;0
HOST;setparam;webmailnw.domain.local-DR;cg_additive_inheritance;0
HOST;setparam;webmailnw.domain.local-DR;host_snmp_community;SNMP-NW
HOST;setparam;webmailnw.domain.local-DR;timezone;0
HOST;setparam;webmailnw.domain.local-DR;host_locked;0
HOST;setparam;webmailnw.domain.local-DR;host_register;1
HOST;setparam;webmailnw.domain.local-DR;host_activate;1
nwdrs07v.domain.localHOST;ADD;webmailnw.domain.local;webmailnw.domain.local;10.107.5.225;;Central;
HOST;setparam;webmailnw.domain.local;host_active_checks_enabled;2
HOST;setparam;webmailnw.domain.local;host_passive_checks_enabled;2
HOST;setparam;webmailnw.domain.local;host_checks_enabled;2
HOST;setparam;webmailnw.domain.local;host_obsess_over_host;2
HOST;setparam;webmailnw.domain.local;host_check_freshness;2
HOST;setparam;webmailnw.domain.local;host_event_handler_enabled;2
HOST;setparam;webmailnw.domain.local;host_flap_detection_enabled;2
HOST;setparam;webmailnw.domain.local;host_process_perf_data;2
HOST;setparam;webmailnw.domain.local;host_retain_status_information;2
HOST;setparam;webmailnw.domain.local;host_retain_nonstatus_information;2
HOST;setparam;webmailnw.domain.local;host_notifications_enabled;2
HOST;setparam;webmailnw.domain.local;contact_additive_inheritance;0
HOST;setparam;webmailnw.domain.local;cg_additive_inheritance;0
HOST;setparam;webmailnw.domain.local;host_snmp_community;SNMP-NW
HOST;setparam;webmailnw.domain.local;timezone;0
HOST;setparam;webmailnw.domain.local;host_locked;0
HOST;setparam;webmailnw.domain.local;host_register;1
HOST;setparam;webmailnw.domain.local;host_activate;1
ivas151v.domain.localivas152v.domain.localHOST;ADD;webBpmNwTest;web BpmNw Test;webBpmNwTest;;Central;
HOST;setparam;webBpmNwTest;check_period;24x7
HOST;setparam;webBpmNwTest;host_max_check_attempts;3
HOST;setparam;webBpmNwTest;host_check_interval;5
HOST;setparam;webBpmNwTest;host_retry_check_interval;2
....

The following are the package versions I installed (updated today)

# rpm -qa | grep centreon | grep -v '^centreon-plugin'
centreon-broker-core-19.04.0-2.el7.centos.x86_64
centreon-poller-centreon-engine-19.04.0-3.el7.centos.noarch
centreon-cwrapper-perl-0.1-1.el7.centos.x86_64
centreon-widget-engine-status-19.04.0-5.el7.centos.noarch
centreon-open-tickets-19.04.0-1.el7.centos.noarch
centreon-engine-bench-19.04.0-2.el7.centos.x86_64
centreon-license-manager-19.04.0-1.el7.centos.noarch
centreon-widget-grid-map-19.04.0-5.el7.centos.noarch
centreon-widget-service-monitoring-19.04.0-5.el7.centos.noarch
centreon-broker-19.04.0-2.el7.centos.x86_64
centreon-connector-ssh-19.04.0-2.el7.centos.x86_64
centreon-broker-cbd-19.04.0-2.el7.centos.x86_64
centreon-license-manager-common-19.04.0-1.el7.centos.noarch
centreon-widget-live-top10-cpu-usage-19.04.0-5.el7.centos.noarch
centreon-widget-host-monitoring-19.04.0-5.el7.centos.noarch
centreon-release-19.04-1.el7.centos.noarch
centreon-widget-global-health-19.04.0-5.el7.centos.noarch
centreon-connector-19.04.0-2.el7.centos.x86_64
centreon-broker-storage-19.04.0-2.el7.centos.x86_64
centreon-engine-extcommands-19.04.0-2.el7.centos.x86_64
centreon-web-19.04.0-3.el7.centos.noarch
centreon-auto-discovery-server-19.04.0-4.el7.centos.x86_64
centreon-19.04.0-3.el7.centos.noarch
centreon-widget-hostgroup-monitoring-19.04.0-5.el7.centos.noarch
centreon-widget-servicegroup-monitoring-19.04.0-7.el7.centos.noarch
centreon-common-19.04.0-3.el7.centos.noarch
centreon-perl-libs-19.04.0-3.el7.centos.noarch
centreon-database-19.04.0-3.el7.centos.noarch
centreon-connector-perl-19.04.0-2.el7.centos.x86_64
centreon-widget-httploader-19.04.0-5.el7.centos.noarch
centreon-open-tickets-module-19.04.0-1.el7.centos.noarch
centreon-engine-daemon-19.04.0-2.el7.centos.x86_64
centreon-open-tickets-widget-19.04.0-1.el7.centos.noarch
centreon-pp-manager-19.04.0-3.el7.centos.noarch
centreon-widget-graph-monitoring-19.04.0-5.el7.centos.noarch
centreon-broker-cbmod-19.04.0-2.el7.centos.x86_64
centreon-clib-19.04.0-1.el7.centos.x86_64
centreon-widget-tactical-overview-19.04.0-7.el7.centos.noarch
centreon-awie-19.04.0-1.el7.centos.noarch
centreon-engine-19.04.0-2.el7.centos.x86_64
centreon-base-config-centreon-engine-19.04.0-3.el7.centos.noarch
centreon-widget-live-top10-memory-usage-19.04.0-5.el7.centos.noarch
centreon-trap-19.04.0-3.el7.centos.noarch
@adr-mo
Copy link
Contributor

adr-mo commented May 27, 2019

Hi @thezipman

Thanks for the feedback 💯

We will check this issue. If we reproduce, we'll open an internal issue and fix it as soon as possible.

Regards

@adr-mo adr-mo added kind/bug status/needs-attention The PR is on-hold. The reasons are specified in the PR labels May 27, 2019
@thezipman
Copy link
Author

If you are unable to reproduce the behaviour I can privately give you a dump of the DB... for obvious reasons I cannot attach it to the issue :D

@thezipman
Copy link
Author

Sorry to disturb... is there any schedule for the resolution of this bug?
It is causing me a lot of trouble but I'm not able to correct it by myself. If there isn't any planned schedule I must create a wrapper to workaround this bug.
Thanks.

@thezipman
Copy link
Author

Today I updated to 19.10 and sadly I saw this bug is still present. :(
I'll dig into the source code to at least find the git commit that broke the export...

@lpinsivy lpinsivy added area/api area/configuration and removed status/needs-attention The PR is on-hold. The reasons are specified in the PR labels Dec 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants