hostgroup empties on modification

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: hostgroup empties on modification

Post by tgriep »

What is the name of the Hostgroup?
Try this, delete the empty hostgroup. Apply the Config. Recreate the Hostgroup and see if you can add hosts to it.
Be sure to check out our Knowledgebase for helpful articles and solutions!
marquetteu
Posts: 47
Joined: Tue Nov 13, 2012 12:08 pm

Re: hostgroup empties on modification

Post by marquetteu »

hostgroup name VM

i deleted, applied config, re-created, applied config, added, applied config and the hostgroup is still empty
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: hostgroup empties on modification

Post by tgriep »

Was this server a fresh install of XI 5.7.1 on RHEL8 or was it an upgrade from a previous version of XI?
How was the Host, Services, etc. created on the system?
In the MYSQL dump. I and seeing dates from years ago which should not be if the system was just created recently.
Be sure to check out our Knowledgebase for helpful articles and solutions!
marquetteu
Posts: 47
Joined: Tue Nov 13, 2012 12:08 pm

Re: hostgroup empties on modification

Post by marquetteu »

we built a fresh install and then did the backup/restore from the old rhel6 server to the new rhel8 server following this:
https://assets.nagios.com/downloads/nag ... ios-XI.pdf
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: hostgroup empties on modification

Post by tgriep »

When backing up a server to restore on to a new server, you have to restore to the same version of XI and then in the document on page 13, follow this section.
"Changed Operating System Version / Architecture / Family"

Then after that run the upgrade of XI.
The reason that has to be done this way is that the XI Upgrade has to upgrade the MYSQL schema of the databases.

The schema did not get updated from what I see because the table linkage is wrong.
If you add a host to any objects, Services, Hostgroups, etc is removes all of the host entries from the object.
We can try and run update the schema manually to see if it updates the tables.

Run the following as root.

Code: Select all

cd /tmp
rm -rf nagiosxi xi*.tar.gz
wget https://assets.nagios.com/downloads/nagiosxi/5/xi-5.7.1.tar.gz
tar xzfv xi-5.7.1.tar.gz

Code: Select all

systemctl stop npcd
systemctl stop nagios
systemctl stop crond
systemctl stop httpd

Code: Select all

mysql -u root -pnagiosxi nagiosql < /tmp/nagiosxi/subcomponents/ccm/db/schema_01.sql
mysql -u root -pnagiosxi nagiosql < /tmp/nagiosxi/subcomponents/ccm/db/schema_02.sql
mysql -u root -pnagiosxi nagiosql < /tmp/nagiosxi/subcomponents/ccm/db/schema_03.sql
mysql -u root -pnagiosxi nagiosql < /tmp/nagiosxi/subcomponents/ccm/db/schema_04.sql

Code: Select all

systemctl start npcd
systemctl start nagios
systemctl start crond
systemctl start httpd
If the above does not work, you may have to manually import the configs from the old server after you remove the configs from the new server.
See this document.
https://library.nagios.com/library/prod ... es-into-xi
Be sure to check out our Knowledgebase for helpful articles and solutions!
marquetteu
Posts: 47
Joined: Tue Nov 13, 2012 12:08 pm

Re: hostgroup empties on modification

Post by marquetteu »

that's really weird because i did the upgrade to 5.7.1 on the old server before i did the migration. either way it did not work. i guess we'll have to do a manual import. after i blow everything away so that we can start clean.

thanks
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: hostgroup empties on modification

Post by tgriep »

Maybe the upgrade on the old server did not 100% convert the schema or there was some sort of corruption.
Let us know if the files getting imported in to the system work for you.
Be sure to check out our Knowledgebase for helpful articles and solutions!
marquetteu
Posts: 47
Joined: Tue Nov 13, 2012 12:08 pm

Re: hostgroup empties on modification

Post by marquetteu »

working on this today/tomorrow. I'll update once i have success/failure.
marquetteu
Posts: 47
Joined: Tue Nov 13, 2012 12:08 pm

Re: hostgroup empties on modification

Post by marquetteu »

the manual config file import worked. i had to play around a bit with the import order, but in the end everything is up and running.

Thanks!!
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: hostgroup empties on modification

Post by tgriep »

Thanks for reporting back that re-importing the files fixed the issue. I'll lock the post for you but feel free to open a new post in the future for any other questions or issues.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked