Page 1 of 2

Nagiox Upgrade problem

Posted: Fri Jun 18, 2021 10:57 am
by wmalcus
Hi
I've problem upgrading nagios XI 2012R2.9 to 5.7.5
Os: centos 6
Db was migrated from postgresql to mysql.

command /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg output

Error: Service escalation host name or description is NULL
Error: Could not register service escalation (config file '/usr/local/nagios/etc/serviceescalations.cfg', starting on line 1736)
Error processing object config files!


define serviceescalation {
host_name sgsrv2
contacts jf066906_SMS,jf150471_SMS
first_notification 2
last_notification 2
notification_interval 0
escalation_period eskal_SMS_timeperiod
escalation_options c,
}

Serviceescalations and hostescalations files generate those problems.

I can edit and remove those definitions in file, but i think that upgrade proces generate and write this files from db.
I can't see this definitions in XI ui.
Do i need some intermediate steps like 2012 -> 5.3 -> 5.5 -> 5.7 ?

Any hint on this ? :)

Thanks in advance

Re: Nagiox Upgrade problem

Posted: Fri Jun 18, 2021 3:32 pm
by dchurch
No, you shouldn't have to upgrade to an intermediate version. It should be a straight shot to upgrade from any version to a newer target version.

I'm thinking there's some issue either in your configuration database, or the code that dumps out the database to the configuration files.

If you PM me a system profile I can diagnose further. Get one by going to Admin (top menu) => System Profile (in the left menu), then clicking the blue button.

If you're unable to generate the the profile through the web interface, please try generating it from the command line by running these commands as root:

Code: Select all

rm -rf /usr/local/nagiosxi/var/components/profile*
/usr/local/nagiosxi/scripts/components/getprofile.sh SUPPORT
Then send me the resulting /usr/local/nagiosxi/var/components/profile.zip file.
If the profile script fails, please include the ENTIRE output.

Re: Nagiox Upgrade problem

Posted: Mon Jun 28, 2021 3:38 pm
by dchurch
Can you please dump your "nagiosql" database into an SQL file and PM that over to me? I'm unable to find that line in your current configuration.

When is the last time you applied config?

Would you be opposed to deploying a new server with Nagios XI latest version on it, then importing your configuration files into its database? Is that what you've been trying to do?

Here's how to create the database dump file:

Code: Select all

mysqldump -uroot -pnagiosxi nagiosql |gzip -9 > /tmp/nagiosql.sql.gz

Re: Nagiox Upgrade problem

Posted: Wed Jul 07, 2021 3:28 am
by wmalcus
We apply config everyday.
Here's our upgrade proces:
1.clone nagios server (vmware )
2.change ip address
3.upgrade to xi 5.7.5 ( latest suported version on Centos 6 )

I can try import config to new server.

Re: Nagiox Upgrade problem

Posted: Wed Jul 07, 2021 11:22 am
by dchurch
Was that SQL dump taken after the upgrade or before?

If it was taken after, there are a couple of columns missing in your schema, namely tbl_serviceescalation.service_description and tbl_serviceescalation.servicegroup_name, and probably more. These columns should have been created during the upgrade process.

Re: Nagiox Upgrade problem

Posted: Wed Aug 11, 2021 9:30 am
by wmalcus
sorry for delay
vaccations :)
it was taken before upgrade

Re: Nagiox Upgrade problem

Posted: Wed Aug 11, 2021 10:57 am
by dchurch
Can you please perform another SQL dump taken post-upgrade?

It may be worth it to upgrade to a newer distro such as RHEL 8 or Ubuntu 20.04 so you can install a newer version of Nagios XI. There have been numerous updates to security and performance since the version of Nagios XI you're currently running. See Nagios XI Change Log for more details.

The process involved is basically: install a fresh Nagios XI on a new server, then migrate your monitoring configuration (and performance data if you desire). Instructions are here, but I can guide you through the migration to a new server if you like.

Re: Nagiox Upgrade problem

Posted: Tue Sep 07, 2021 3:12 am
by wmalcus
so procedure should looks like this
1. install new system.
2. install most recent nagios version on new system.
3. move data/config from old to new nagios server.

i'll try that
thanks for Your help and time.

Re: Nagiox Upgrade problem

Posted: Tue Sep 07, 2021 3:50 pm
by benjaminsmith
Hi,

Helping Dan out on this support question as he is out this week.

Just remember you have to backup and restore between the same versions of XI. So you will want to upgrade the Cent 6 server to the highest version supported (5.7.5). Then install this version on the new server and then upgrade to the latest.

Be sure to take a full backup or VM snapshot before proceeding. Please send us the system profile if you like us to check the logs before proceeding.

You can find archived versions of Nagios XI here.
https://assets.nagios.com/downloads/nag ... rsions.php

Let us know if you have any questions and if you run into errors please post them to the thread.

Reference

Migrating Nagios XI to a different Server

Re: Nagiox Upgrade problem

Posted: Tue Oct 19, 2021 8:48 am
by wmalcus
Hello
I'am little confused right now.
I've tryed upgrade nagios to 5.7.5 with no luck, erros on first post.