Upgrade process fail. Missing components. 5.6.7 -> 5.8.7
Posted: Thu Mar 03, 2022 4:56 am
Hello community!
We have a "little" problem with the NagiosXI upgrade process (5.6.7 -> 5.8.7). We have two servers in different environments, one in Production env. (PROD) and other in integration env. (INT). None of the servers have internet access even the installation was a normal one (no offline installation). We've requestes access to some URLs and We've tested the upgrade process in INT to test everything we need to upgrade in a safe way the PROD server.
PROD server:
32 CPUs
128 GB RAM
INT server:
8 CPUs
32 GB RAM
Both servers have their database installed locally, and despite of having different hardware resources, regarding software they are supposed to be mirror servers. We use INT as the last test before publishing new features to PROD.
We are suffering poblems inserting the data in nagios database using ndoutils, ndo2db is too slow and is not able to insert all the data in the DB. I'm pretty sure that we didn't reach the limit of the server, it has enough resources to handle the double amount of assets. We have an old server that is handling the double amount of assets, however is inserting less objects macros. Based on the realase notes, NDOutils3 has improved performance inserting data in the database, so it is the solution for our main problem.
cat /etc/sysctl.conf | grep kernel
ipcs -q
Meanwhile we were debuging the problem with NDOutils, we realized that our PROD server has a non updated ndoutils package and ipcs queues are maxed out.
I'd like to figure out why the NDOutils component was not updated during the NagiosXI upgrade:
nagiosxi/subcomponents/ndo/upgrade
Could we do a manual upgrade of that component without affecting the rest of the components?, how risky is that process?
And last but no least, with NDOUtils3.x how can we manage it?
Thanks in advance.
BR,
Juanma.
We have a "little" problem with the NagiosXI upgrade process (5.6.7 -> 5.8.7). We have two servers in different environments, one in Production env. (PROD) and other in integration env. (INT). None of the servers have internet access even the installation was a normal one (no offline installation). We've requestes access to some URLs and We've tested the upgrade process in INT to test everything we need to upgrade in a safe way the PROD server.
PROD server:
32 CPUs
128 GB RAM
INT server:
8 CPUs
32 GB RAM
Both servers have their database installed locally, and despite of having different hardware resources, regarding software they are supposed to be mirror servers. We use INT as the last test before publishing new features to PROD.
We are suffering poblems inserting the data in nagios database using ndoutils, ndo2db is too slow and is not able to insert all the data in the DB. I'm pretty sure that we didn't reach the limit of the server, it has enough resources to handle the double amount of assets. We have an old server that is handling the double amount of assets, however is inserting less objects macros. Based on the realase notes, NDOutils3 has improved performance inserting data in the database, so it is the solution for our main problem.
cat /etc/sysctl.conf | grep kernel
Code: Select all
kernel.randomize_va_space = 2
kernel.msgmnb = 796432000
kernel.msgmax = 796432000
kernel.shmmax = 4294967295
kernel.shmall = 268435456
Code: Select all
------ Message Queues --------
key msqid owner perms used-bytes messages
0x49000040 32802 nagios 600 796288000 777625
Code: Select all
UPGRADE: Nagios Core upgraded OK.
UPGRADE: NDO is being upgraded...
UPGRADE: NDO manually downgraded -- skipping
UPGRADE: Nagios Plugins is being upgraded...
Applying Nagios XI patches to Nagios Plugins...
checking for a BSD-compatible install... /bin/install -c
checking whether build environment is sane... yes
nagiosxi/subcomponents/ndo/upgrade
Code: Select all
function version_gt ()
{
# Copied from ndo-3 db-mgmt.sh
# thanks stackoverflow #16989598/bash-comparing-version-numbers
test "$(printf '%s\n' "$@" | sort -V | head -n 1)" != "$1"
}
if [ -f '/usr/local/nagios/bin/ndo2db' ] && [ "$1" != "-f" ]; then
...
# Grab version from database
ndoversion=$(mysql "$ndoname" -u "$ndouser" -p"$ndopass" -h "$ndohost" -P "$ndoport" -se "SELECT version FROM nagios_dbversion WHERE name='ndoutils';")
if version_gt "$ndoversion" "2.1.3"; then
# Downgraded system
echo "UPGRADE: NDO manually downgraded -- skipping"
exit 0
fi
...
Code: Select all
mysql -u$user -D nagios -se "SELECT version FROM nagios_dbversion WHERE name='ndoutils';" -p
Enter password:
version
2.0.1
2.0.1
2.0.1
2.0.1
2.0.1
2.0.1
2.0.1
2.0.1
2.0.1
2.0.1
2.0.1
2.0.1
And last but no least, with NDOUtils3.x how can we manage it?
Thanks in advance.
BR,
Juanma.