Page 1 of 1

hostgroups and bpi

Posted: Tue Apr 21, 2020 7:21 am
by scharft
after deleting a big amount of host's, some hostgroups can't be delete: "An error occurred while attempting to apply your configuration to Nagios Core. Monitoring engine configuration files have been rolled back to their last known good checkpoint."

and bpi shows missing objects: The current BPI config has 97 missing objects. Missing objects will show up as having an UNKNOWN or UNREACHABLE status

Syncing host and servicegroups result in:
Error: Unable to match string in config file.
Unable to match string in config file.Backup successfully created.
Groups Deleted: 0
Unable to match string in config file.
Backup successfully created.
BPI configuration applied successfully

the host has rebootet, the database repairscript was executed, i can go back to another snapshots but thats the wrong direction.
Please assist...

Re: hostgroups and bpi

Posted: Tue Apr 21, 2020 3:34 pm
by cdienger
What is the name of some of the hostgroups that you are trying to delete? Please provide this information as well a profile and copy of the current configuration found in the nagiosql database. These can have sensitive information so please PM them to me instead of posting them on the forum.

A profile can be generated under Admin > System Config > System Profile > Download Profile, or from the command line with:

Code: Select all

/usr/local/nagiosxi/scripts/components/getprofile.sh 58256
The profile is then saved to:

/usr/local/nagiosxi/var/components/profile.zip

If the default database is being used then the copy of nagiosql can be gathered from the command line with:

Code: Select all

mysqldump -uroot -pnagiosxi nagiosql > nagiosql.sql
If the database has been offloaded to another machine then you'll need to modify the commands slightly to look like:

Code: Select all

mysqldump -h database_host_ip -uusername -ppassword nagiosql > nagiosql.sql​​
If you're not sure about the credentials or database server IP you can review /usr/local/nagiosxi/html/config.inc.php​. A copy of this is also included in the profile so we can review it if necessary.

Re: hostgroups and bpi

Posted: Tue May 05, 2020 3:13 am
by scharft
Hi,
e.g. these hostgroups:

SERVICE-GLT
SERVICE-GLT-DC_ALT
SERVICE-GLT-DC_KR
SERVICE-GLT-DC_VI
SERVICE-GLT-LUEFTUNG
SERVICE-GLT-OSI
SERVICE-GLT-USK
SERVICE-GLT-USP
SERVICE-GLT-US_ALT
SERVICE-GLT-US_PX
SERVICE-GLT-US_PX_KR
SERVICE-GLT-VM
SERVICE-GLT-WG
SERVICE-GLT-WRITER
SERVICE-OSIPI-GLT


i've send you the profile

Re: hostgroups and bpi

Posted: Tue May 05, 2020 1:29 pm
by cdienger
Is there more the "An error occurred while attempting to apply your configuration to Nagios Core ... " message? Usually it will show some specific configs it is having isssues of. Please provide a screenshot after reproducing the issue withapplying configuration. I think once we can get this sorted the bpi should sync and resolve itself.

Based on the profile, it looks like we can get a copy of the current configuration that is failing by running:

Code: Select all

mysqldump -uroot -pnagiosxi nagiosql > nagiosql.sql
We'll want to gather the nagiosql.sql file.

Re: hostgroups and bpi

Posted: Tue Jun 02, 2020 12:28 am
by scharft
after deleting some host groups that we no longer need:

Error: Could not find any hostgroup matching 'SERVICE-GLT-WRITER' (config file '/usr/local/nagios/etc/hosts/eurotherm_l_72.cfg', starting on line 16)
Error: Failed to process hostgroup names for host 'eurotherm_l_72' (config file '/usr/local/nagios/etc/hosts/eurotherm_l_72.cfg', starting at line 16)

Moderator's Note: The file has been shared with the support team but has been removed from the public forum.

Re: hostgroups and bpi

Posted: Tue Jun 02, 2020 3:41 pm
by ssax
Run this command (as root) and PM one of us the resulting /tmp/BPIFILES.zip​:​

zip -r /tmp/BPIFILES.zip /usr/local/nagiosxi/etc/components /usr/local/nagiosxi/var/components/bpi.log

What do you have set in Home > BPI > Edit BPI Settings? Please send me a screenshot.

Please send me a copy of your profile, you can download it from Admin > System Profile > Download Profile and upload it to the ticket by clicking the "choose item" link at the bottom of the menu.​ Make sure to wait until the file is finished uploading before clicking the Post Reply button.

Attach your latest /etc/php.ini as well.

Thank you!

Re: hostgroups and bpi

Posted: Wed Jun 03, 2020 9:33 am
by scharft
done

best regards

Re: hostgroups and bpi

Posted: Wed Jun 03, 2020 5:10 pm
by ssax
Thank you, received. I'll lab this up in the morning (end of our day today) and see what I can find. If you don't hear from me by midday, please respond so that it pops up on our dashboard.

Re: hostgroups and bpi

Posted: Mon Jun 08, 2020 11:14 am
by ssax
I was able to replicate this, it's because you have the hostgroup defined on the hosts, when you delete the hostgroup they are still defined on the hosts so it's failing.

Make the changes again and then do this:

Please go to Configure > Core Config Manager > Tools > Config File Management:
- Click the Delete Files button (don't worry, it's safe, they will be rewritten)
- Then click the Write Configs button
- Once they are done being written, Click the Verify button, if it verifies properly try to apply config.

If it doesn't verify properly please send the full output.

Then if it applies successfully, check BPI and it should be updated.

NOTE: XI 5.7 is out and BPI has been revamped to include a revisioning system to help out with BPI stuff.