Page 1 of 2
Upgrading from Nagios XI 2012 to Latest
Posted: Wed Feb 11, 2015 8:32 am
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?
Re: Upgrading from Nagios XI 2012 to Latest
Posted: Wed Feb 11, 2015 10:29 am
by scottwilkerson
Can you run the following as root,
It look like there is an error in the crontab
Re: Upgrading from Nagios XI 2012 to Latest
Posted: Wed Feb 11, 2015 10:33 am
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 ~]#
Re: Upgrading from Nagios XI 2012 to Latest
Posted: Wed Feb 11, 2015 10:42 am
by abrist
Those lines look ok. What is the output of:
Re: Upgrading from Nagios XI 2012 to Latest
Posted: Wed Feb 11, 2015 10:50 am
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 ~]#
Re: Upgrading from Nagios XI 2012 to Latest
Posted: Wed Feb 11, 2015 10:53 am
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?
Re: Upgrading from Nagios XI 2012 to Latest
Posted: Wed Feb 11, 2015 12:54 pm
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...
Re: Upgrading from Nagios XI 2012 to Latest
Posted: Wed Feb 11, 2015 1:59 pm
by lmiltchev
Do you have any other crons in the "/var/spool/cron/" besides root?
Can you run the following command and show us the output?
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".
Re: Upgrading from Nagios XI 2012 to Latest
Posted: Wed Feb 11, 2015 2:26 pm
by JakeHatMacys
lmiltchev wrote:Do you have any other crons in the "/var/spool/cron/" besides root?
Can you run the following command and show us the output?
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
Re: Upgrading from Nagios XI 2012 to Latest
Posted: Wed Feb 11, 2015 2:27 pm
by JakeHatMacys
This is the first part to that log file
upgrade1.log