Page 1 of 2
Upgrade question
Posted: Mon Sep 11, 2017 9:36 am
by S54326
Hi, we are currently on 2014R2.0 and want to upgrade to the latest version (5.4.9). Are there any particular stages we need to go through for a successful upgrade?
Our original install was from one of your VM images. Which was upgraded to our current version.
I ask because I'm getting variable results when upgrading a clone VM. I know you have made changes to the databases used behind the scenes, is there a conversion process to go through? Do we have to go through an intermediate release version(s) before trying the latest version?
Thanks in advance
Steve
Re: Upgrade question
Posted: Mon Sep 11, 2017 10:05 am
by dwhitfield
S54326 wrote: Are there any particular stages we need to go through for a successful upgrade?
I'm not sure what you mean by stages, but my question would be what OS you are on and what OS you will be on. If you are on CentOS/RHEL 6 or 7 and are staying on that, you should be able to follow our upgrade instructions:
https://assets.nagios.com/downloads/nag ... nstall.pdf
If this is an offline install, you will need to use the instructions at repo.nagios.com.
Re: Upgrade question
Posted: Mon Sep 11, 2017 10:19 am
by S54326
Our OS is Centos 6.6 and it will remain so.
I've followed those instructions today on a cloned VM and the process fails during the pnp part.
This is the last of the install text
Code: Select all
/pnp/pnp-latest
*** Main program, Scripts and HTML files installed ***
Please run 'make install-config' to install sample
configuration files
Please run 'make install-init' if you want to use
BULK Mode with NPCD
make[1]:Leaving directory `/usr/local/nagiosxi/tmp/nagiosxi/subcomponents/pnp/pnp-
latest'
sed: -e expression #1, char 90: extra characters after command
Re: Upgrade question
Posted: Mon Sep 11, 2017 12:42 pm
by dwhitfield
It's possible there is a bug in 5.4.9 that we have not yet discovered. Do you get the same error if you try to upgrade to 5.4.8?
https://assets.nagios.com/downloads/nag ... rsions.php
If so, I would suggest trying to upgrade to the last version in the 2014 series and see if that works:
https://assets.nagios.com/downloads/nag ... 2.7.tar.gz
Obviously, the further between upgrades the more likely any customization is likely to cause issues. You can then try to go to the first version of 5:
https://assets.nagios.com/downloads/nag ... 1.0.tar.gz
Basically, if we can figure out where the issue was introduced, we have a better chance of figuring out what code is actually causing the issue, and correct the issue.
Re: Upgrade question
Posted: Tue Sep 12, 2017 5:40 am
by S54326
I took a new clone copy of our live system changing IP,hostname as needed.
I tried upgrading to 2014R2.7, it fails with "sed: -e expression #1, char 90: extra characters after command".
I then tried 2014R2.1, it also fails with the same error.
Could it be that the failed upgrade to the live system last week has left some remnants and is causing this issue?
I attempted to upgrade the live system last week. Initially it looked OK but then I could not log in to the web pages. I ran out of time to attempt resolution so had to restore the backup.
I have attached the upgrade.log from the 2014R2.1 attempt on the test VM today.
Re: Upgrade question
Posted: Tue Sep 12, 2017 4:33 pm
by dwhitfield
What's the output of /usr/local/nagiosxi/var/xiversion? That upgrade.log is odd. For one thing, it doesn't have the sed error. Did you upgrade pnp outside of our install by chance?
Re: Upgrade question
Posted: Wed Sep 13, 2017 3:56 am
by S54326
Output of /usr/local/nagiosxi/var/xiversion
Code: Select all
###################################
# DO NOT DELETE THIS FILE!
# Nagios XI version information
###################################
full=2014R2.0
major=2014
minor=R2.0
releasedate=2014-11-11
release=409
The sed error appears on the console immediately after the last line that is in the update.log
No, I have not upgraded pnp outside your install.
Re: Upgrade question
Posted: Wed Sep 13, 2017 2:27 pm
by scottwilkerson
can I have you open up the upgrade script and at about line 512
change this
Code: Select all
# Fix the auto-backup scripts
if [ -f /root/scripts/automysqlbackup ]; then
sed -i 's/eval rm -fv "$BACKUPDIR\/weekly\/$DB_week.$REMW.*"/eval rm -fv "$BACKUPDIR\/weekly\/$DB\/${DB}_week.$REMW.*"/' /root/scripts/automysqlbackup
fi
if [ -f /root/scripts/autopostgresqlbackup ]; then
sed -i 's/eval rm -fv "$BACKUPDIR\/weekly\/$DB\/week.$REMW.*"/eval rm -fv "$BACKUPDIR\/weekly\/$DB\/${DB}_week.$REMW.*"/' /root/scripts/autopostgresqlbackup
fi
to this
Code: Select all
# Fix the auto-backup scripts
# if [ -f /root/scripts/automysqlbackup ]; then
# sed -i 's/eval rm -fv "$BACKUPDIR\/weekly\/$DB_week.$REMW.*"/eval rm -fv "$BACKUPDIR\/weekly\/$DB\/${DB}_week.$REMW.*"/' /root/scripts/automysqlbackup
# fi
# if [ -f /root/scripts/autopostgresqlbackup ]; then
# sed -i 's/eval rm -fv "$BACKUPDIR\/weekly\/$DB\/week.$REMW.*"/eval rm -fv "$BACKUPDIR\/weekly\/$DB\/${DB}_week.$REMW.*"/' /root/scripts/autopostgresqlbackup
# fi
Then try the upgrade again
Re: Upgrade question
Posted: Thu Sep 14, 2017 4:47 am
by S54326
Hi, so with upgrade v5.4.9, edited the upgrade script as suggested then ran the script.
On screen -
Code: Select all
*** Main program, Scripts and HTML files installed ***
Please run 'make install-config' to install sample
configuration files
Please run 'make install-init' if you want to use
BULK Mode with NPCD
make[1]: Leaving directory `/tmp/nagiosxi/subcomponents/pnp/pnp-latest'
sed: -e expression #1, char 90: extra characters after command
As before the sed error appears on screen but not in the log file.
After a little more delving the error comes from the subcomponents/pnp/upgrade script line 33. So I commented out lines 32-34 (and put the main upgrade script back as was). Re-ran the main script ... it now fails with
Code: Select all
Updating NRDP..
cp: cannot stat `/usr/local/nrdp/server/config.inc.php': No such file or directory
Which is right, the directoy /usr/local/nrdp does not exist.
Which brings me back to my original question - what is the upgrade path from 2014R2.0 to 5.4.9 ?
Re: Upgrade question
Posted: Thu Sep 14, 2017 3:02 pm
by dwhitfield
As was already stated, the upgrade path is described in
https://assets.nagios.com/downloads/nag ... nstall.pdf
What is the output of
sestatus?
Please post (or PM) your
/etc/sudoers.
Have you made any modifications to the standard CentOS/RHEL install? What about XI specifically?
Can you PM me your Profile? You can download it by going to Admin > System Config > System Profile and click the ***Download Profile*** button towards the top. If for whatever reason you *cannot* download the profile, please put the output of View System Info (5.3.4+, Show Profile if older) in the thread (that will at least get us some info). This will give us access to many of the logs we would otherwise ask for individually. If security is a concern, you can unzip the profile take out what you like, and then zip it up again. We may end up needing something you remove, but we can ask for that specifically.
You can also generate a profile manually using the script at /usr/local/nagiosxi/html/includes/components/profile/getprofile.sh
That should generate a profile in /usr/local/nagiosxi/var/components/ which you can get off the server with an application such as FileZilla.
After you PM the profile, please update this thread. Updating this thread is the only way for it to show back up on our dashboard.