Page 2 of 3

Re: BPI Configuration Corrupt and Hostchecks Report Unknown

Posted: Tue Jan 05, 2021 12:48 pm
by shoreypu
Since the upgrade to Nagios XI 5.7.5 this morning, things have gotten worse. The BPI configuration keeps getting erased when I apply a configuration, so we are unable to maintain the BPI checks. Here is a screenshot of the configuration backups.
BPI_Config_Mgmt.jpg

Re: BPI Configuration Corrupt and Hostchecks Report Unknown

Posted: Wed Jan 06, 2021 10:53 am
by cdienger
Collected these files while it is a good state:

Code: Select all

/usr/local/nagiosxi/var/components/bpi.xml
/usr/local/nagiosxi/var/components/bpi.log
/usr/local/nagiosxi/etc/components/bpi.conf
Then apply the configuration again to reproduce the problem of the erasing the BPI config and collect the logs again. I'd like to see a before and after. I would also like to see a copy of the CCM database which can be gathered with:

Code: Select all

mysqldump -uroot -pnagiosxi nagiosql > nagiosql.sql
Please send all the data to me via private message.

Re: BPI Configuration Corrupt and Hostchecks Report Unknown

Posted: Wed Jan 06, 2021 3:01 pm
by shoreypu
The files have been sent. Thanks

Re: BPI Configuration Corrupt and Hostchecks Report Unknown

Posted: Thu Jan 07, 2021 4:42 pm
by cdienger
Just an update to let you know that I've received the files and loading them into a lab machine now to test. I'll update you later today or tomorrow.

Re: BPI Configuration Corrupt and Hostchecks Report Unknown

Posted: Fri Jan 08, 2021 11:39 am
by cdienger
I've been able to reproduce with the data provided. I'm still digging into this, but it looks like it has to do with the "Remove missing hosts and services from all groups" option enabled on the settings page. It's an option that can be disabled as a potential temporary work around.

Re: BPI Configuration Corrupt and Hostchecks Report Unknown

Posted: Tue Jan 26, 2021 1:50 pm
by shoreypu
Just checking back for an update. I've implemented the temporary workaround, but I've been apprehensive to enable the associated checks at this time.

Re: BPI Configuration Corrupt and Hostchecks Report Unknown

Posted: Wed Jan 27, 2021 5:12 pm
by cdienger
I don't have an update to share but will look into this again some more and will update you tomorrow.

Re: BPI Configuration Corrupt and Hostchecks Report Unknown

Posted: Thu Jan 28, 2021 5:27 pm
by cdienger
I'm pinging dev to get more eyes on this and will have another update tomorrow. Oddly it only seems to be a problem when applying configuration in the web interface. It doesn't seem to be a problem when applying from the command line or running the syncall directly:

Code: Select all

/usr/local/nagiosxi/scripts/reconfigure_nagios.sh
php /usr/local/nagiosxi/html/includes/components/nagiosbpi/api_tool.php --cmd=syncall

Re: BPI Configuration Corrupt and Hostchecks Report Unknown

Posted: Thu Mar 25, 2021 7:32 am
by shoreypu
I recently upgraded to v5.8.2, then re-enabled "Remove missing hosts and services from all groups" to see if the issue was resolved with the upgrade, however it was not. Are there any updates from your end?

Thanks

Re: BPI Configuration Corrupt and Hostchecks Report Unknown

Posted: Thu Mar 25, 2021 5:37 pm
by ssax
First, edit this file:

Code: Select all

/usr/local/nagiosxi/html/includes/components/nagiosbpi/api_tool.php
Change this (line 287):

Code: Select all

    $config_string = process_post($arr, $add);
To:

Code: Select all

    $vars = array();
    $config_string = process_post($arr, $add, $vars);
Then see if that fixes it.

If it doesn't, try increasing Admin > Performance Settings > Subsystem > BPI Sync NDO Startup Timeout to a higher value (say like 300) and see if that fixes it.

If neither of those fixes it, please create a ticket for this and include a link back to this forum thread so we can get a remote session setup to investigate further:

https://support.nagios.com/tickets/

Thank you!