Upgrade from 2014R2.0 to 2014R2.2

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
gravitas
Posts: 27
Joined: Wed May 21, 2014 9:18 am

Upgrade from 2014R2.0 to 2014R2.2

Post 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
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

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

Post 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?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
gravitas
Posts: 27
Joined: Wed May 21, 2014 9:18 am

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

Post 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?
Last edited by gravitas on Tue Dec 30, 2014 3:14 pm, edited 1 time in total.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

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

Post 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
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
gravitas
Posts: 27
Joined: Wed May 21, 2014 9:18 am

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

Post 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
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

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

Post by tgriep »

Could you post the output from this command from a shell?

Code: Select all

df -h
Be sure to check out our Knowledgebase for helpful articles and solutions!
gravitas
Posts: 27
Joined: Wed May 21, 2014 9:18 am

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

Post 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
gravitas
Posts: 27
Joined: Wed May 21, 2014 9:18 am

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

Post 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
cmerchant
Posts: 546
Joined: Wed Sep 24, 2014 11:19 am

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

Post 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.
Locked