Page 1 of 2
Upgrade Failure
Posted: Tue May 04, 2021 10:51 am
by mchenier
Good Morning,
I was trying to upgrade our Nagios we are running and it will not upgrade
[root@nagios ~]# cat /proc/version
Linux version 2.6.32-754.29.2.el6.x86_64 (
[email protected]) (gcc version 4.4.7 20120313 (Red Hat 4.4.7-23) (GCC) ) #1 SMP Tue May 12 17:39:04 UTC 2020
Can someone please tell me how to go about to upgrade? Do I need to build another server? How do I transfer all the data if I need to rebuild the server?
Running upgrade
------------------------------
CentOS/RHEL 6 - End of Life
------------------------------
Nagios XI no longer supports CentOS/RHEL 6 due to it being EOL as of 11/30/2020.
If you'd like to upgrade your Nagios XI past 5.7.5, you will need to install it on
a supported distro such as CentOS/RHEL 7 or 8.
For more information on how to transition, please visit the support forum:
https://support.nagios.com/forum/
Regards, Marc
Re: Upgrade Failure
Posted: Wed May 05, 2021 10:12 am
by vtrac
Hi Marc,
How are you doing? ...

Yes, CentOS/RHEL 6 - End of Life was November 30, 2020.
You'll need to migrate to EL7 or EL8 in order to upgrade past XI 5.7.5 per the output.
The XI backup/restore process makes this pretty easy:
The process is this:
- Spin up new server running EL7/EL8 latest
- Install the exact same version of XI that the old server has on the new server, no need to configure it, just install it (do not try to restore over different versions you will cause issues)
https://assets.nagios.com/downloads/nag ... -Linux.pdf
- If you have a RAMDisk installed or are using RRDCacheD on the old system, set them up before restoring:
https://assets.nagios.com/downloads/nag ... giosXI.pdf
https://assets.nagios.com/downloads/nag ... ios-XI.pdf
- Backup the old/transfer to new/restore to the new
- Follow the After The Restore section from the backup/restore guide completely
- Since you're changing OS versions, run the restore_repair script from the backup/restore guide
https://assets.nagios.com/downloads/nag ... ios-XI.pdf
- Shutdown (or re-IP) the old, set the old IP on the new system so you don't have to update agent configs/FW rules
https://support.nagios.com/kb/article/c ... s-549.html
That's pretty much it. Please be aware of what a single XI license entitles you to:
https://support.nagios.com/kb/article.php?id=145
If you have any issues, post the full install.log/upgrade.log/any errors you see.
Best Regards,
Vinh
Re: Upgrade Failure
Posted: Wed May 05, 2021 3:28 pm
by mchenier
Hi Vinh,
I upgraded to CentOS Linux release 7.9.2009 (Core) and NagiosXi 5.8.3 and having issues
I cannot seem to be able to apply the configuration
Error: Service has no hosts and/or service_description (config file '/usr/local/nagios/etc/services/bbydd.heu.org.cfg', starting on line 48)
An error occurred while attempting to apply your configuration to Nagios Core. Monitoring engine configuration files have been rolled back to their last known good checkpoint.
[[root@nagios services]# cat /usr/local/nagios/etc/services/bbydd.heu.org.cfg
###############################################################################
#
# Services configuration file
#
# Created by: Nagios CCM 3.0.5
# Date: 2020-02-24 09:34:03
# Version: Nagios Core 4.x
#
# --- DO NOT EDIT THIS FILE BY HAND ---
# Nagios CCM will overwrite all manual settings during the next update if you
# would like to edit files manually, place them in the 'static' directory or
# import your configs into the CCM by placing them in the 'import' directory.
#
###############################################################################
define service {
host_name bbydd.heu.org
service_description / Disk Usage
use xiwizard_linuxsnmp_storage
check_command check_xi_service_snmp_linux_storage! -C HEU1t5nmp --v2c -m "^/$" -w 80 -c 95 -f
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 60
notification_period xi_timeperiod_24x7
contacts mchenier_admin
contact_groups admins
_xiwizard linux_snmp
register 1
}
define service {
host_name bbydd.heu.org
service_description /db Disk Usage
use xiwizard_linuxsnmp_storage
check_command check_xi_service_snmp_linux_storage! -C HEU1t5nmp --v2c -m "^/db$" -w 80 -c 95 -f
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 60
notification_period xi_timeperiod_24x7
contacts mchenier_admin
contact_groups admins
_xiwizard linux_snmp
register 1
}
define service {
host_name bbydd.heu.org
service_description /ddr/ext Disk Usage
use xiwizard_linuxsnmp_storage
check_command check_xi_service_snmp_linux_storage! -C HEU1t5nmp --v2c -m "^/ddr/ext$" -w 80 -c 95 -f
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 60
notification_period xi_timeperiod_24x7
contacts mchenier_admin
contact_groups admins
_xiwizard linux_snmp
register 1
}
define service {
host_name bbydd.heu.org
service_description /ddr/ext/col1/repl Disk Usage
use xiwizard_linuxsnmp_storage
check_command check_xi_service_snmp_linux_storage! -C HEU1t5nmp --v2c -m "^/ddr/ext/col1/repl$" -w 80 -c 95 -f
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 60
notification_period xi_timeperiod_24x7
contacts mchenier_admin
contact_groups admins
_xiwizard linux_snmp
register 1
}
define service {
host_name bbydd.heu.org
service_description /ddr/var Disk Usage
use xiwizard_linuxsnmp_storage
check_command check_xi_service_snmp_linux_storage! -C HEU1t5nmp --v2c -m "^/ddr/var$" -w 80 -c 95 -f
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 60
notification_period xi_timeperiod_24x7
contacts mchenier_admin
contact_groups admins
_xiwizard linux_snmp
register 1
}
define service {
host_name bbydd.heu.org
service_description /ddr/var/core Disk Usage
use xiwizard_linuxsnmp_storage
check_command check_xi_service_snmp_linux_storage! -C HEU1t5nmp --v2c -m "^/ddr/var/core$" -w 80 -c 95 -f
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 60
notification_period xi_timeperiod_24x7
contacts mchenier_admin
contact_groups admins
_xiwizard linux_snmp
register 1
}
define service {
host_name bbydd.heu.org
service_description /ddr/var_extra Disk Usage
use xiwizard_linuxsnmp_storage
check_command check_xi_service_snmp_linux_storage! -C HEU1t5nmp --v2c -m "^/ddr/var_extra$" -w 80 -c 95 -f
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 60
notification_period xi_timeperiod_24x7
contacts mchenier_admin
contact_groups admins
_xiwizard linux_snmp
register 1
}
define service {
host_name bbydd.heu.org
service_description /dev/shm Disk Usage
use xiwizard_linuxsnmp_storage
check_command check_xi_service_snmp_linux_storage! -C HEU1t5nmp --v2c -m "^/dev/shm$" -w 80 -c 95 -f
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 60
notification_period xi_timeperiod_24x7
contacts mchenier_admin
contact_groups admins
_xiwizard linux_snmp
register 1
}
define service {
host_name bbydd.heu.org
service_description CPU Usage
use xiwizard_linuxsnmp_load
check_command check_xi_service_snmp_linux_load! -C HEU1t5nmp --v2c -w 80 -c 90 -f
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 60
notification_period xi_timeperiod_24x7
contacts mchenier_admin
contact_groups admins
_xiwizard linux_snmp
register 1
}
define service {
host_name bbydd.heu.org
service_description Ping
check_command check-host-alive
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 60
notification_period xi_timeperiod_24x7
contacts mchenier_admin
contact_groups admins
_xiwizard linux_snmp
register 1
}
define service {
host_name bbydd.heu.org
service_description Swap Usage
use xiwizard_linuxsnmp_storage
check_command check_xi_service_snmp_linux_storage! -C HEU1t5nmp --v2c -m 'Swap' -w 5 -c 10 -f
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 60
notification_period xi_timeperiod_24x7
contacts mchenier_admin
contact_groups admins
_xiwizard linux_snmp
register 1
}
###############################################################################
#
# Services configuration file
#
# END OF FILE
#
############################################################################
When I run RUN Check Command
[nagios@nagios ~]$ /usr/local/nagios/libexec/check_snmp_storage_wizard.pl -H 172.16.14.2 -C HEU1t5nmp --v2c -m "^/db$" -w 80 -c 95 -f
Unknown storage : \^/db$ : ERROR
bbydd.heu.org
This host has been scheduled for fixed downtime from 05-05-2021 08:34:30 to 05-07-2021 10:34:30. Notifications for the host will not be sent out during that time period.This host is in scheduled downtimeView service status details for this host
/ Disk Usage
Ok 2h 40m 44s 1/5 2021-05-05 13:24:14 /: 40%used(1625MB/4030MB) (<80%) : OK
/db Disk Usage
Ok 2h 40m 15s 1/5 2021-05-05 13:24:44 /db: 22%used(2201MB/10076MB) (<80%) : OK
/ddr/ext Disk Usage
Ok 2h 39m 37s 1/5 2021-05-05 13:25:19 /ddr/ext: 17%used(336MB/1984MB) (<80%) : OK
Thanks, Marc
Re: Upgrade Failure
Posted: Wed May 05, 2021 4:00 pm
by vtrac
Hi Marc,
How are you doing?
Did you install the exact same version of XI that the old server has on the new server?
Did you take a backup of your old server and restore onto the new server?
Did you run the restore_repair script on the new server since your are changing OS from 6 to 7.x?
Once restored, upgrade new server to latest XI version.
How did the upgrade went?
Regards,
Vinh
Re: Upgrade Failure
Posted: Wed May 05, 2021 5:14 pm
by mchenier
Hi Vinh,
Yes I backuped up the old one and restored it onto the new server and I can see all the server most are green but cannot make any changes. I install 5.7.5 then restored and then ran wget -O upgrade.sh
https://assets.nagios.com/downloads/nagiosxi/upgrade.sh
sh ./upgrade.sh..
Where is the restore_repair script?
This is what I ran:
1. Install new VM with Nagios XI 5.7.5 using the OVA link below with CentOS 7.
Code: Select all
https://assets.nagios.com/downloads/nag ... 7.5-64.ova
2. Run a backup on the current Cent 6 system.
Code: Select all
/usr/local/nagiosxi/scripts/backup_xi.sh
3. Transfer the backup archive from the Cent 6 server to Cent 7 system. The backups are in the following folder:
Code: Select all
/store/backups/nagiosxi/
4. Run the restore script to transfer your configuration files, user accounts, and historical data.
Code: Select all
/usr/local/nagiosxi/scripts/restore_xi.sh </full/path/to/backupfile.tar.gz>
5.Change the IP address on the Cent 7 system. See page 13 of the guide.
6. Upgrade to the latest version of Nagios XI
Code: Select all
wget -O upgrade.sh
https://assets.nagios.com/downloads/nagiosxi/upgrade.sh
sh ./upgrade.sh
Regards, Marc
Re: Upgrade Failure
Posted: Thu May 06, 2021 9:11 am
by vtrac
Hi Marc,
How are you doing?
https://assets.nagios.com/downloads/nag ... ios-XI.pdf
Here's the section from the above URL with "restore_repair.sh":
Code: Select all
Changed Operating System Version / Architecture / Family
If you are restoring a backup from a different OS version, architecture or family this can be a problem
because the backup is overwriting the compiled binaries. To fix this you will need to execute the following
commands:
cd /tmp/
wget https://assets.nagios.com/downloads/nagiosxi/scripts/restore_repair.sh
chmod +x restore_repair.sh
./restore_repair.sh
Best Regards,
Vinh
Re: Upgrade Failure
Posted: Thu May 06, 2021 11:43 am
by mchenier
Hi Vinh,
Do you see anything wrong?, Thanks!
An error occurred while attempting to apply your configuration to Nagios Core. Monitoring engine configuration files have been rolled back to their last known good checkpoint.
Error: Service has no hosts and/or service_description (config file '/usr/local/nagios/etc/services/bbydd.heu.org.cfg', starting on line 48)
[root@nagios tmp]# cat /usr/local/nagios/etc/services/bbydd.heu.org.cfg
###############################################################################
#
# Services configuration file
#
# Created by: Nagios CCM 3.0.5
# Date: 2020-02-24 09:34:03
# Version: Nagios Core 4.x
#
# --- DO NOT EDIT THIS FILE BY HAND ---
# Nagios CCM will overwrite all manual settings during the next update if you
# would like to edit files manually, place them in the 'static' directory or
# import your configs into the CCM by placing them in the 'import' directory.
#
###############################################################################
define service {
host_name bbydd.heu.org
service_description / Disk Usage
use xiwizard_linuxsnmp_storage
check_command check_xi_service_snmp_linux_storage! -C HEU1t5nmp --v2c -m "^/$" -w 80 -c 95 -f
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 60
notification_period xi_timeperiod_24x7
contacts mchenier_admin
contact_groups admins
_xiwizard linux_snmp
register 1
}
define service {
host_name bbydd.heu.org
service_description /db Disk Usage
use xiwizard_linuxsnmp_storage
check_command check_xi_service_snmp_linux_storage! -C HEU1t5nmp --v2c -m "^/db$" -w 80 -c 95 -f
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 60
notification_period xi_timeperiod_24x7
contacts mchenier_admin
contact_groups admins
_xiwizard linux_snmp
register 1
}
define service {
host_name bbydd.heu.org
service_description /ddr/ext Disk Usage
use xiwizard_linuxsnmp_storage
check_command check_xi_service_snmp_linux_storage! -C HEU1t5nmp --v2c -m "^/ddr/ext$" -w 80 -c 95 -f
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 60
notification_period xi_timeperiod_24x7
contacts mchenier_admin
contact_groups admins
_xiwizard linux_snmp
register 1
}
define service {
host_name bbydd.heu.org
service_description /ddr/ext/col1/repl Disk Usage
use xiwizard_linuxsnmp_storage
check_command check_xi_service_snmp_linux_storage! -C HEU1t5nmp --v2c -m "^/ddr/ext/col1/repl$" -w 80 -c 95 -f
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 60
notification_period xi_timeperiod_24x7
contacts mchenier_admin
contact_groups admins
_xiwizard linux_snmp
register 1
}
define service {
host_name bbydd.heu.org
service_description /ddr/var Disk Usage
use xiwizard_linuxsnmp_storage
check_command check_xi_service_snmp_linux_storage! -C HEU1t5nmp --v2c -m "^/ddr/var$" -w 80 -c 95 -f
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 60
notification_period xi_timeperiod_24x7
contacts mchenier_admin
contact_groups admins
_xiwizard linux_snmp
register 1
}
define service {
host_name bbydd.heu.org
service_description /ddr/var/core Disk Usage
use xiwizard_linuxsnmp_storage
check_command check_xi_service_snmp_linux_storage! -C HEU1t5nmp --v2c -m "^/ddr/var/core$" -w 80 -c 95 -f
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 60
notification_period xi_timeperiod_24x7
contacts mchenier_admin
contact_groups admins
_xiwizard linux_snmp
register 1
}
define service {
host_name bbydd.heu.org
service_description /ddr/var_extra Disk Usage
use xiwizard_linuxsnmp_storage
check_command check_xi_service_snmp_linux_storage! -C HEU1t5nmp --v2c -m "^/ddr/var_extra$" -w 80 -c 95 -f
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 60
notification_period xi_timeperiod_24x7
contacts mchenier_admin
contact_groups admins
_xiwizard linux_snmp
register 1
}
define service {
host_name bbydd.heu.org
service_description /dev/shm Disk Usage
use xiwizard_linuxsnmp_storage
check_command check_xi_service_snmp_linux_storage! -C HEU1t5nmp --v2c -m "^/dev/shm$" -w 80 -c 95 -f
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 60
notification_period xi_timeperiod_24x7
contacts mchenier_admin
contact_groups admins
_xiwizard linux_snmp
register 1
}
define service {
host_name bbydd.heu.org
service_description CPU Usage
use xiwizard_linuxsnmp_load
check_command check_xi_service_snmp_linux_load! -C HEU1t5nmp --v2c -w 80 -c 90 -f
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 60
notification_period xi_timeperiod_24x7
contacts mchenier_admin
contact_groups admins
_xiwizard linux_snmp
register 1
}
define service {
host_name bbydd.heu.org
service_description Ping
check_command check-host-alive
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 60
notification_period xi_timeperiod_24x7
contacts mchenier_admin
contact_groups admins
_xiwizard linux_snmp
register 1
}
define service {
host_name bbydd.heu.org
service_description Swap Usage
use xiwizard_linuxsnmp_storage
check_command check_xi_service_snmp_linux_storage! -C HEU1t5nmp --v2c -m 'Swap' -w 5 -c 10 -f
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 60
notification_period xi_timeperiod_24x7
contacts mchenier_admin
contact_groups admins
_xiwizard linux_snmp
register 1
}
###############################################################################
#
# Services configuration file
#
# END OF FILE
#
###############################################################################
You have new mail in /var/spool/mail/roo
Regards, Marc
Re: Upgrade Failure
Posted: Thu May 06, 2021 11:53 am
by mchenier
Hi Vinh,
I run a run check command
Host Address
[nagios@nagios ~]$ /usr/local/nagios/libexec/check_snmp_storage_wizard.pl -H 172.16.14.2 -C HEU1t5nmp --v2c -m "^/$" -w 80 -c 95 -f
Unknown storage : \^/$ : ERROR
Re: Upgrade Failure
Posted: Thu May 06, 2021 2:03 pm
by mchenier
Apply Configuration
Backend login to the Core Config Manager failed.
An error occurred while attempting to apply your configuration to Nagios Core. Monitoring engine configuration files have been rolled back to their last known good checkpoint.
Re: Upgrade Failure
Posted: Thu May 06, 2021 2:47 pm
by mchenier
[root@nagios scripts]# ./reconfigure_nagios.sh
--- reset_config_perms.sh ------------
> Setting script permissions
> Setting CCM script permissions
> Setting special script permissions
> Setting special component script permissions
> Setting configuration file/directory permissions
> Setting perfdata directory and RRD permissions
> Setting libexec directory permissions
> Setting Nagios XI config permissions
> Setting NOM checkpoint user:group permissions
> + Setting CCM configuration file user:group permissions
> + Setting Recurring Downtime file user:group permissions
> + Setting BPI configuration file user:group permissions
--------------------------------------
--- ccm_import.php -------------------
> Setting import directory: /usr/local/nagios/etc/import/
> Importing config files into the CCM
- Importing: /usr/local/nagios/etc/import/BBYWSUS.heu.org.cfg .. PHP Notice: Undefined index: host_name in /usr/local/nagiosxi/html/includes/components/ccm/classes/import.class.php on line 574
PHP Notice: Undefined index: host_name in /usr/local/nagiosxi/html/includes/components/ccm/classes/import.class.php on line 911
PHP Notice: Undefined index: host_name in /usr/local/nagiosxi/html/includes/components/ccm/classes/import.class.php on line 574
PHP Notice: Undefined index: host_name in /usr/local/nagiosxi/html/includes/components/ccm/classes/import.class.php on line 911
ERROR
Duplicate entry '1' for key 'config_name'Entry host_name:: inside tbl_host could not be inserted: 1<br>Entry host_name:: inside tbl_host could not be inserted: 1<br>
--------------------------------------
Importing into the CCM failed!
You have new mail in /var/spool/mail/root
[root@nagios scripts]#