Page 1 of 1

Issue: Migrating Legacy Nagios XI 5.6.7 (RHEL 7) to Modern OS and Version

Posted: Fri Mar 27, 2026 8:56 am
by omnicore
Hello community,
I am tasked with migrating a complex, legacy Nagios XI architecture. My current environment is running Nagios XI 5.6.7 on RHEL 7, both of which are now End of Life (EOL) and no support, to a supported Nagiosxi and OS .

To ensure a stable transition, I am planning a multi-stage migration following the recommended path:

Stage 1: Deploy a clean instance of Nagios XI (version 5.6.7) on a similar RHEL-based OS.
Stage 2: Restore a full backup from the production server to this new instance.
Stage 3: Perform a stepped upgrade through major releases (e.g., 5.x -> 2024.x).
Stage 4: Once updated, migrate the final backup to a modern, supported OS (such as Ubuntu 24.04 or RHEL 9).

To follow the recommended migration path, I have set up a CentOS 7 instance using vault repositories. I successfully installed a clean Nagios XI 5.6.7 and I have a full backup from the production server.

However, I am encountering issues during the restore process. I ran the restore script sudo /usr/local/nagiosxi/scripts/restore_xi.sh /store/backups/nagiosxi/1774024999.tar.gz and, while it processes most tasks, it ends with errors. Specifically, when running the configuration verification command sudo /usr/local/nagiosxi/scripts/reconfigure_nagios.sh, I get the following:

Code: Select all

Checking objects...
Error: Service check command 'check_local_mem!30!20' specified in service 'Memory Usage' for host 'localhost' not defined anywhere!
did I something?

Thanks in advance for your insights!

Re: Issue: Migrating Legacy Nagios XI 5.6.7 (RHEL 7) to Modern OS and Version

Posted: Fri Mar 27, 2026 12:05 pm
by DoubleDoubleA
Something happened with your Nagios configs, though I am not sure how to know where in the process it happened or why.

Part of creating correct Nagios configs is defining commands, in this case a check command. While any config can live in any .cfg file, standard practice is to put commands in commands.cfg. You could look at the contents of commands.cfg and see if that file in general looks like you might expect.

It might be difficult to troubleshoot this effectively through the forum, so you may wish to create a support case on this one. In theory you once had this command in your configs, since Nagios would not have started if you didn't. How did it go missing in the migration? Tough to say without more investigation. Commands are stored in the database and then written out to files for the monitoring engine to start up. Perhaps something went awry in the database migration?

Re: Issue: Migrating Legacy Nagios XI 5.6.7 (RHEL 7) to Modern OS and Version

Posted: Fri Mar 27, 2026 1:48 pm
by omnicore
Hi, thanks for the reply.
yes, Iam starting to think the production has been messed with too much, the current administrators are new so the contects is vague.
is there a posibility that hardcoded things would not by picked up by the backup script in a functional Nagiosxi?

Ones more thanks for your insights

Re: Issue: Migrating Legacy Nagios XI 5.6.7 (RHEL 7) to Modern OS and Version

Posted: Fri Mar 27, 2026 2:56 pm
by DoubleDoubleA
A lot of things could have happened, hard to say.

However, if you would like to get past this error, you could just define the command in the new XI machine. Follow the instructions on page 3 of this doc https://assets.nagios.com/downloads/nag ... I-2024.pdf .

The command name should be

Code: Select all

check_local_mem
and the command line should be

Code: Select all

$USER1$/check_mem.sh -w $ARG1$ -c $ARG2$
.

After that you can run the pre-flight check

Code: Select all

/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
and if it passes try to start the nagios process

Code: Select all

systemctl start nagios