hostgroups and bpi

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
scharft
Posts: 112
Joined: Wed Jul 29, 2015 6:55 am

hostgroups and bpi

Post 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...
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: hostgroups and bpi

Post 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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
scharft
Posts: 112
Joined: Wed Jul 29, 2015 6:55 am

Re: hostgroups and bpi

Post 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
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: hostgroups and bpi

Post 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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
scharft
Posts: 112
Joined: Wed Jul 29, 2015 6:55 am

Re: hostgroups and bpi

Post 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.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: hostgroups and bpi

Post 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!
scharft
Posts: 112
Joined: Wed Jul 29, 2015 6:55 am

Re: hostgroups and bpi

Post by scharft »

done

best regards
You do not have the required permissions to view the files attached to this post.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: hostgroups and bpi

Post 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.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: hostgroups and bpi

Post 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.
Locked