Page 1 of 1

Upgrade from 2014R2.0 to 2014R2.2

Posted: Fri Dec 26, 2014 10:48 pm
by gravitas
I tried to execute the upgrade a few times and even manually. The upgrade fails on one section on stops (Leaving directory `/tmp/nagiosxi/subcomponents/pnp/pnp-latest'). Does anybody know the issue?
make[2]: Entering directory `/tmp/nagiosxi/subcomponents/pnp/pnp-latest/scripts'
/usr/bin/install -c -m 755 -o nagios -g nagios check_pnp_rrds.pl /usr/local/nagios/libexec
make[2]: Leaving directory `/tmp/nagiosxi/subcomponents/pnp/pnp-latest/scripts'
make[1]: Leaving directory `/tmp/nagiosxi/subcomponents/pnp/pnp-latest/scripts'
cd ./sample-config && make install
make[1]: Entering directory `/tmp/nagiosxi/subcomponents/pnp/pnp-latest/sample-config'
rm -f /usr/local/nagios/share/pnp/conf/config.php
/usr/bin/install -c -m 755 -o nagios -g nagios -d /usr/local/nagios/etc/pnp
/usr/bin/install -c -m 755 -o nagios -g nagios -d /usr/local/nagios/etc/pnp/check_commands
/usr/bin/install -c -m 755 -o nagios -g nagios -d /usr/local/nagios/etc/pnp/pages
/usr/bin/install -c -m 644 -o nagios -g nagios pnp/pnp4nagios_release /usr/local/nagios/etc/pnp
/usr/bin/install -c -m 644 -o nagios -g nagios pnp/config.php /usr/local/nagios/etc/pnp
/usr/bin/install -c -m 644 -o nagios -g nagios pnp/background.pdf /usr/local/nagios/etc/pnp
make[1]: Leaving directory `/tmp/nagiosxi/subcomponents/pnp/pnp-latest/sample-config'
make install-basic
make[1]: Entering directory `/tmp/nagiosxi/subcomponents/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 `/tmp/nagiosxi/subcomponents/pnp/pnp-latest'
sed: -e expression #1, char 93: extra characters after command

Re: Upgrade from 2014R2.0 to 2014R2.2

Posted: Sat Dec 27, 2014 7:07 pm
by Box293
Can you run this command please and return the output:

Code: Select all

sed -n -e '/perfdata_spool_dir =.\// s/.*\= *//p' /usr/local/nagios/etc/pnp/npcd.cfg
And also run this command:

Code: Select all

ls -al /usr/local/nagios/etc/pnp/npcd.cfg
What is the user account which is running the upgrade script?

Re: Upgrade from 2014R2.0 to 2014R2.2

Posted: Mon Dec 29, 2014 9:51 am
by gravitas
I am running it as root user.

[root@nagios ~]# sed -n -e '/perfdata_spool_dir =.\// s/.*\= *//p' /usr/local/nagios/etc/pnp/npcd.cfg
/usr/local/nagios/var/spool/perfdata/
/var/nagiosramdisk/spool/perfdata/


-rw-rw-r-- 1 apache nagios 3146 Sep 18 17:43 /usr/local/nagios/etc/pnp/npcd.cfg


Hmm, I think i see this issue now. Do I need to change permissions?

Re: Upgrade from 2014R2.0 to 2014R2.2

Posted: Mon Dec 29, 2014 11:46 am
by scottwilkerson
Lets edit line 4 of /tmp/nagiosxi/subcomponents/pnp/upgrade
from

Code: Select all

pnp_spool_dir=$(sed -n -e '/perfdata_spool_dir =.\// s/.*\= *//p' /usr/local/nagios/etc/pnp/npcd.cfg)
to

Code: Select all

pnp_spool_dir=$(sed -n -e '/^perfdata_spool_dir =.\// s/.*\= *//p' /usr/local/nagios/etc/pnp/npcd.cfg)
and then run the following to attempt the upgrade again

Code: Select all

cd /tmp/nagiosxi
./upgrade

Re: Upgrade from 2014R2.0 to 2014R2.2

Posted: Tue Dec 30, 2014 3:13 pm
by gravitas
It did not change much. See Output Below.

Just to clarify config. This is just a CentOS NagiosXI VMware OVF with another CentOS server running the MYSQL portion. It is at version 2014R2.0 now.

rm -f /usr/local/nagios/share/pnp/conf/config.php
/usr/bin/install -c -m 755 -o nagios -g nagios -d /usr/local/nagios/etc/pnp
/usr/bin/install -c -m 755 -o nagios -g nagios -d /usr/local/nagios/etc/pnp/check_commands
/usr/bin/install -c -m 755 -o nagios -g nagios -d /usr/local/nagios/etc/pnp/pages
/usr/bin/install -c -m 644 -o nagios -g nagios pnp/pnp4nagios_release /usr/local/nagios/etc/pnp
/usr/bin/install -c -m 644 -o nagios -g nagios pnp/config.php /usr/local/nagios/etc/pnp
/usr/bin/install -c -m 644 -o nagios -g nagios pnp/background.pdf /usr/local/nagios/etc/pnp
make[1]: Leaving directory `/tmp/nagiosxi/subcomponents/pnp/pnp-latest/sample-config'
make install-basic
make[1]: Entering directory `/tmp/nagiosxi/subcomponents/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 `/tmp/nagiosxi/subcomponents/pnp/pnp-latest'
sed: -e expression #1, char 93: extra characters after command

Re: Upgrade from 2014R2.0 to 2014R2.2

Posted: Tue Dec 30, 2014 3:40 pm
by tgriep
Could you post the output from this command from a shell?

Code: Select all

df -h

Re: Upgrade from 2014R2.0 to 2014R2.2

Posted: Tue Dec 30, 2014 5:08 pm
by gravitas
Here you go.

Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root
28G 16G 11G 61% /
tmpfs 5.9G 0 5.9G 0% /dev/shm
/dev/sda1 485M 116M 345M 26% /boot
/dev/mapper/VolGroup2-lv_home
9.9G 151M 9.2G 2% /home
/dev/mapper/VolGroup3-lv_mysql
79G 7.4G 68G 10% /var/lib/mysql
/dev/mapper/VolGroup4-lv_backups
50G 8.5G 39G 19% /store





thx,
robert

Re: Upgrade from 2014R2.0 to 2014R2.2

Posted: Tue Dec 30, 2014 11:11 pm
by gravitas
Okay, I found the issue after reviewing the script and cfg.

It was in this variable output.

root@nagios ~]# sed -n -e '/perfdata_spool_dir =.\// s/.*\= *//p' /usr/local/nagios/etc/pnp/npcd.cfg


I saw it in the cfg file twice and it somehow messed up the installation script. I removed the extra one and the upgrade completed.[/color]

thx rob

Re: Upgrade from 2014R2.0 to 2014R2.2

Posted: Fri Jan 02, 2015 9:41 am
by cmerchant
It's possible from having run the script multiple times that might have added the extra line. Glad you found it.
We'll go ahead and close this thread. Thanks.