Page 2 of 2

Re: hostgroup empties on modification

Posted: Tue Jun 23, 2020 11:07 am
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.

Re: hostgroup empties on modification

Posted: Tue Jun 23, 2020 11:33 am
by marquetteu
hostgroup name VM

i deleted, applied config, re-created, applied config, added, applied config and the hostgroup is still empty

Re: hostgroup empties on modification

Posted: Wed Jun 24, 2020 10:32 am
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.

Re: hostgroup empties on modification

Posted: Wed Jun 24, 2020 4:43 pm
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

Re: hostgroup empties on modification

Posted: Thu Jun 25, 2020 9:51 am
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

Re: hostgroup empties on modification

Posted: Fri Jun 26, 2020 12:01 pm
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

Re: hostgroup empties on modification

Posted: Fri Jun 26, 2020 2:57 pm
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.

Re: hostgroup empties on modification

Posted: Mon Jul 20, 2020 11:10 am
by marquetteu
working on this today/tomorrow. I'll update once i have success/failure.

Re: hostgroup empties on modification

Posted: Mon Jul 20, 2020 1:38 pm
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!!

Re: hostgroup empties on modification

Posted: Mon Jul 20, 2020 1:47 pm
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.