Page 1 of 2

NagiosXI 5.5 Upgrade (Fresh install)

Posted: Tue Oct 02, 2018 6:17 pm
by russell.it
Morning,

I have been attempting to upgrade our NagiosXI 5.4 install to 5.5.

I am doing this on a fresh VM as we wish to upgrade from CentOS 6. We are using the offline tarball to do the install.

Then I copy other the configuration files in the order specified one the import config files page.

All hosts, services etc. copy over correctly service/host checks are working but the perf charts are missing. They are there for the default localhost host/service check that is part of the install. All the imported configurations are don't have the perf charts. How can I get the charts to come back up.

Also is it possible to copy over the historic perf data? I know the files are check in /usr/local/nagios/share/perf can I drop those files on the new server in the same location with out isses?

Cheers,

Russell

Re: NagiosXI 5.5 Upgrade (Fresh install)

Posted: Wed Oct 03, 2018 10:11 am
by scottwilkerson
russell.it wrote:Also is it possible to copy over the historic perf data? I know the files are check in /usr/local/nagios/share/perf can I drop those files on the new server in the same location with out isses?
Yes, as long as you didn't also change from 32bit to 64bit system

If you would have used a standard backup and restore on the same versions of XI this would have all transferred.

https://assets.nagios.com/downloads/nag ... ios-XI.pdf

Re: NagiosXI 5.5 Upgrade (Fresh install)

Posted: Wed Oct 03, 2018 4:52 pm
by russell.it
Hi,

I tried backing up our install both the the CLI method and Web method based off the document you linked.

The cli method failed due to a password error for mysql.
NOTE 2: If you changed your MySQL root password to something different than "nagiosxi" (the default), you
will need to edit the script and change the themysqlpass= definition found in the first few lines of the script.
Says to modify themysqlpass variable that varible but it isn't in the script.

The web method says it is going to create the backup and it will be available on "Local backup archives" but after an hour there is no backup there.

Any ideas on how to get the backup to run.

Cheers,

Russell

Re: NagiosXI 5.5 Upgrade (Fresh install)

Posted: Wed Oct 03, 2018 11:35 pm
by tacolover101
you should see it in restore_xi.sh

Code: Select all

[root@localhost scripts]# cat restore_xi.sh|nl|grep themysqlpass
     4  themysqlpass="nagiosxi"
   164  mysqlpass="$themysqlpass"
this doc may help - https://assets.nagios.com/downloads/nag ... ios-XI.pdf

Re: NagiosXI 5.5 Upgrade (Fresh install)

Posted: Thu Oct 04, 2018 7:05 am
by scottwilkerson

Re: NagiosXI 5.5 Upgrade (Fresh install)

Posted: Sun Oct 07, 2018 4:34 pm
by russell.it
I have updated restore_xi.sh with the following users mysql password.

root
nagios
nagiosql

I still have the same issue. I have manually connected to the sql db to confirm I had the correct password without issue.

Is there a different account its trying to use? I have tried all the passwords I could find in our documentation of the orginal install.

Re: NagiosXI 5.5 Upgrade (Fresh install)

Posted: Mon Oct 08, 2018 12:02 pm
by cdienger
Is it the restore script on the cli that is failing to run or the backup? If restore, what is the actual error you see when you try to run the restore script? The
NOTE 2: If you changed your MySQL root password ...
message doesn't appear to be a part of any of the scripts.

The backup script issues these commands:

mysqldump -h "$ndoutils_dbserver" --port="$ndoutils_dbport" -u $cfg__db_info__ndoutils__user --password="$cfg__db_info__ndoutils__pwd" --add-drop-database -B $cfg__db_info__ndoutils__db > $mydir/mysql/nagios.sql

mysqldump -h "$nagiosql_dbserver" --port="$nagiosql_dbport" -u $cfg__db_info__nagiosql__user --password="$cfg__db_info__nagiosql__pwd" --add-drop-database -B $cfg__db_info__nagiosql__db > $mydir/mysql/nagiosql.sql

mysqldump -h "$nagiosxi_dbserver" --port="$nagiosxi_dbport" -u $cfg__db_info__nagiosxi__user --password="$cfg__db_info__nagiosxi__pwd" --add-drop-database -B $cfg__db_info__nagiosxi__db > $mydir/mysql/nagiosxi.sql


These variables are pulled from /usr/local/nagiosxi/var/xi-sys.cfg. Here are the default credentials set in the file:

cfg__db_info__ndoutils__user='ndoutils'
cfg__db_info__ndoutils__pwd='n@gweb'
cfg__db_info__nagiosql__user='nagiosql'
cfg__db_info__nagiosql__pwd='n@gweb'
cfg__db_info__nagiosxi__user='nagiosxi'
cfg__db_info__nagiosxi__pwd='n@gweb'

Re: NagiosXI 5.5 Upgrade (Fresh install)

Posted: Mon Oct 08, 2018 4:31 pm
by russell.it
Its the backup that I am trying to do.

At the moment.

The error I get is

Code: Select all

mysqldump: Got error: 130: "Incorrect file format 'nagios_systemcommands" when using LOCK TABLES"
Error backing up MySQL database 'nagios' - check the password in this script!

Re: NagiosXI 5.5 Upgrade (Fresh install)

Posted: Tue Oct 09, 2018 10:23 am
by cdienger
It looks like the database may be corrupt. Use https://assets.nagios.com/downloads/nag ... tabase.pdf to repair it and try the backup again.

Re: NagiosXI 5.5 Upgrade (Fresh install)

Posted: Thu Oct 11, 2018 9:23 pm
by russell.it
Reading further into the restore process, we currently have an external database on the old install. It looks like it will connect to the old database and try to restore to there.

Is it possible to make the restore_xi script restore to a local database in stead?

I don't need/want an external database for our install.

or do you have a process for moving the database back onto the same VM?