Upgrading from Nagios XI 2012 to Latest

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
JakeHatMacys
Posts: 281
Joined: Thu Sep 25, 2014 3:21 pm

Upgrading from Nagios XI 2012 to Latest

Post by JakeHatMacys »

Long story short we had some issues getting access past our Firewall, we've now got that issue resolved so attempting to upgrade... seemed to get pretty far then failed here:

Code: Select all

*** Main program, CGIs and HTML files installed ***

You can continue with installing Nagios as follows (type 'make'
without any arguments for a list of all possible options):

  make install-init
     - This installs the init script in /etc/rc.d/init.d

  make install-commandmode
     - This installs and configures permissions on the
       directory for holding the external command file

  make install-config
     - This installs sample config files in /usr/local/nagios/etc

make[1]: Leaving directory `/tmp/nagiosxi/subcomponents/nagioscore/nagios-4.0.8'
Running configuration check...
Stopping nagios:. done.
Starting nagios: done.
Updating NRDP..
Enabling Nagios repo...
Installing Nagios Repo PKG: packages/nagios-repo-6-2.el6.noarch.rpm
warning: packages/nagios-repo-6-2.el6.noarch.rpm: Header V4 RSA/SHA1 Signature, key ID 1e924cb3: NOKEY
Preparing...                ##################################################
nagios-repo                 ##################################################
no crontab for nagios
Saving old crontab to /tmp/root.crontab.orig...
Removing XI cron jobs...
"-":4: bad minute
errors in crontab file, can't install.
Any ideas?
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Upgrading from Nagios XI 2012 to Latest

Post by scottwilkerson »

Can you run the following as root,

Code: Select all

crontab -l
It look like there is an error in the crontab
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
JakeHatMacys
Posts: 281
Joined: Thu Sep 25, 2014 3:21 pm

Re: Upgrading from Nagios XI 2012 to Latest

Post by JakeHatMacys »

[root@esu2v239 ~]# crontab -l
5 0 * * * /usr/local/bin/nmon -x -f -t -s 900 -c 96 -m /archive/nmon_data 2>/dev/null
50 0 * * * /home/scripts/sys_info/prog/move_nmon_data.ksh 2>&1
50 2 * * 2 Shutting down ntpd: [ OK ]
Starting ntpd: [ OK ]
[root@esu2v239 ~]#
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Upgrading from Nagios XI 2012 to Latest

Post by abrist »

Those lines look ok. What is the output of:

Code: Select all

cat /etc/cron.d/nagiosxi
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
JakeHatMacys
Posts: 281
Joined: Thu Sep 25, 2014 3:21 pm

Re: Upgrading from Nagios XI 2012 to Latest

Post by JakeHatMacys »

[root@esu2v239 ~]# cat /etc/cron.d/nagiosxi
# /etc/cron.d/nagiosxi: crontab fragment for nagiosxi

# Backup MySQL & PostgreSQL Databases
0 7 * * * root /root/scripts/automysqlbackup
0 8 * * * root /root/scripts/autopostgresqlbackup

* * * * * nagios /usr/bin/php -q /usr/local/nagiosxi/cron/sysstat.php > /usr/local/nagiosxi/var/sysstat.log 2>&1
* * * * * nagios /usr/bin/php -q /usr/local/nagiosxi/cron/cmdsubsys.php > /usr/local/nagiosxi/var/cmdsubsys.log 2>&1
* * * * * nagios /usr/bin/php -q /usr/local/nagiosxi/cron/eventman.php > /usr/local/nagiosxi/var/eventman.log 2>&1
* * * * * nagios /usr/bin/php -q /usr/local/nagiosxi/cron/feedproc.php > /usr/local/nagiosxi/var/feedproc.log 2>&1
* * * * * nagios /usr/bin/php -q /usr/local/nagiosxi/cron/perfdataproc.php > /usr/local/nagiosxi/var/perfdataproc.log 2>&1
* * * * * nagios /usr/bin/php -q /usr/local/nagiosxi/cron/nom.php > /usr/local/nagiosxi/var/nom.log 2>&1
* * * * * nagios /usr/bin/php -q /usr/local/nagiosxi/cron/reportengine.php > /usr/local/nagiosxi/var/reportengine.log 2>&1
*/5 * * * * nagios /usr/bin/php -q /usr/local/nagiosxi/cron/dbmaint.php > /usr/local/nagiosxi/var/dbmaint.log 2>&1
* * * * * nagios /usr/bin/php -q /usr/local/nagiosxi/cron/cleaner.php > /usr/local/nagiosxi/var/cleaner.log 2>&1
01 * * * * nagios /usr/local/nagiosxi/cron/recurringdowntime.pl > /usr/local/nagiosxi/var/recurringdowntime.log 2>&1
*/5 * * * * nagios /usr/bin/php -q /usr/local/nagiosxi/cron/deadpool.php > /usr/local/nagiosxi/var/deadpool.log 2>&1

[root@esu2v239 ~]#
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Upgrading from Nagios XI 2012 to Latest

Post by abrist »

Well, those look fine as well. Do you get the same error if you rerun the upgrade, do you get the error again?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
JakeHatMacys
Posts: 281
Joined: Thu Sep 25, 2014 3:21 pm

Re: Upgrading from Nagios XI 2012 to Latest

Post by JakeHatMacys »

Yep same error...

upgrade.log last entry:

Code: Select all

*** Exfoliation theme installed ***
NOTE: Use 'make install-classicui' to revert to classic Nagios theme

make[1]: Leaving directory `/tmp/nagiosxi/subcomponents/nagioscore/nagios-4.0.8'
make install-basic
make[1]: Entering directory `/tmp/nagiosxi/subcomponents/nagioscore/nagios-4.0.8'
/usr/bin/install -c -m 775 -o nagios -g nagios -d /usr/local/nagios/libexec
/usr/bin/install -c -m 775 -o nagios -g nagios -d /usr/local/nagios/var
/usr/bin/install -c -m 775 -o nagios -g nagios -d /usr/local/nagios/var/archives
/usr/bin/install -c -m 775 -o nagios -g nagcmd -d /usr/local/nagios/var/spool/checkresults
chmod g+s /usr/local/nagios/var/spool/checkresults

*** Main program, CGIs and HTML files installed ***

You can continue with installing Nagios as follows (type 'make'
without any arguments for a list of all possible options):

  make install-init
     - This installs the init script in /etc/rc.d/init.d

  make install-commandmode
     - This installs and configures permissions on the
       directory for holding the external command file

  make install-config
     - This installs sample config files in /usr/local/nagios/etc

make[1]: Leaving directory `/tmp/nagiosxi/subcomponents/nagioscore/nagios-4.0.8'
Running configuration check...
Stopping nagios:. done.
Starting nagios: done.
Updating NRDP..
Saving old crontab to /tmp/root.crontab.orig.1...
Removing XI cron jobs...
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Upgrading from Nagios XI 2012 to Latest

Post by lmiltchev »

Do you have any other crons in the "/var/spool/cron/" besides root?

Code: Select all

ll /var/spool/cron
Can you run the following command and show us the output?

Code: Select all

cat /var/spool/cron/root
Note: Even though the output from the commands you ran looked fine, you may have some weird line endings, etc. I would recommend running dos2unix against each crontab file just in case, for example:

Code: Select all

yum install dos2unix -y
dos2unix /etc/cron.d/nagiosxi /var/spool/mail/root
Try to upgrade again. If it fails, post the complete "upgrade.log".
Be sure to check out our Knowledgebase for helpful articles and solutions!
JakeHatMacys
Posts: 281
Joined: Thu Sep 25, 2014 3:21 pm

Re: Upgrading from Nagios XI 2012 to Latest

Post by JakeHatMacys »

lmiltchev wrote:Do you have any other crons in the "/var/spool/cron/" besides root?

Code: Select all

ll /var/spool/cron
Can you run the following command and show us the output?

Code: Select all

cat /var/spool/cron/root
Note: Even though the output from the commands you ran looked fine, you may have some weird line endings, etc. I would recommend running dos2unix against each crontab file just in case, for example:

Code: Select all

yum install dos2unix -y
dos2unix /etc/cron.d/nagiosxi /var/spool/mail/root
Try to upgrade again. If it fails, post the complete "upgrade.log".
Had to split it in two because it was 1.3 megabytes originally. Bottom half is going in this post.
upgrade.log
You do not have the required permissions to view the files attached to this post.
JakeHatMacys
Posts: 281
Joined: Thu Sep 25, 2014 3:21 pm

Re: Upgrading from Nagios XI 2012 to Latest

Post by JakeHatMacys »

This is the first part to that log file
upgrade1.log
You do not have the required permissions to view the files attached to this post.
Locked