Page 1 of 1

Nagios XI 2024R1 upgrade bug

Posted: Wed Jan 10, 2024 2:26 pm
by hbouma
The upgrade script does not work if you have an offloaded database. Everything is setup expecting localhost or the mysql commands are run without specifying the offloaded server name.

The file /tmp/nagiosxi/nagiosxi/nagiosxi-db/mods/mysql/schema_60000_root.sql file assumes that everything is on localhost instead of an offloaded database. In addition, the SQL command does not pass the -h and database server. For instance:
mysql -u root --password="$mysqlpass" -h $cfg__db_info__nagiosxi__dbserver < nagiosxi/nagiosxi-db/mods/mysql/schema_60000_root.sql


Lastly, the commands will never work because the offloaded database instructions do not create the "GRANT OPTION" for the root user. https://assets.nagios.com/downloads/nag ... Server.pdf has the following on page 11:
GRANT ALL ON *.* TO root@'<IP_OF_NAGIOS_XI_SERVER>';

But it should read:
GRANT ALL ON *.* TO root@'<IP_OF_NAGIOS_XI_SERVER>' WITH GRANT OPTION;

Re: Nagios XI 2024R1 upgrade bug

Posted: Thu Jan 11, 2024 12:01 pm
by jmichaelson
I'm sorry about that. I'll open up an issue for the problem.

Re: Nagios XI 2024R1 upgrade bug

Posted: Thu Jan 11, 2024 2:28 pm
by hbouma
One last bug.

This is using mysqlpass from /usr/local/nagiosxi/var/xi-sys.cfg, however, that is never changed when you offload a database, so it is incorrect.

You may want to update the offload database instructions to change that password as well.

Re: Nagios XI 2024R1 upgrade bug

Posted: Fri Jan 12, 2024 2:01 pm
by sgardil
Thanks for letting us know about this issue, I will add it to the issue made, and will also make note for upgrading the instructions for offloading the database.