I need to upgrade CentOS7 to RHEL v9

I need to OS upgrade on my existing Icinga 2 , here is some details:

Icinga2 versions: 2.14.2 -1
CentOS version : 7.9 (core)
Apache version: 2.4.6
Influxdb : 1.8.10
MariaDB : 5.5.68
Icinga web2 : 2.12.1
PHP version : 7.3.29

Well, you are going to have a lot of work :slight_smile:

Since you are running a pretty recent Icinga 2 and IcingaWeb 2, those are not going to be the problem. But the rest will be.

This pretty much depends on what you added to the basic setup. Monitoring Plugins, Web modules etc.

And, honestly, I doubt someone can give a reasonable prediction on what you have to expect without know your setup in great detail.
The best way to approach this, is probably to rebuild your setup in a new machine, import the configuration and see what breaks.
After cleaning up everything broken, you can drop the data on the new setup,
import the data from the old one and replace the new machine with the old.

That way you have time to fix stuff without having a huge monitoring downtime.

@lorenz ,

Thanks for your response. Can describe me in detail for the migration the configuration and data from old to New machine?

Here is what the docs recommend backing up:

Ensure to include the following in your backups:

  • Configuration files in /etc/icinga2
  • Certificate files in /var/lib/icinga2/ca (Master CA key pair) and /var/lib/icinga2/certs (node certificates)
  • Runtime files in /var/lib/icinga2

The new VM should have the same name as the old one so the CA and certs are still valid and other icinga nodes (satellites, agents) are able to connect to the master.
In case the web interface runs on the same host also backup the /etc/icingaweb2, /usr/share/icingaweb2/modules and webserver config directory (apache/httpd or nginx)

Obviously the database(s) should be backup as well, in case they run on the same host.

Other than that you can backup your plugins folder(s) in case you have additional plugins to those that come out of the nagios-plugins or monitoring-plugins packages.

That’s all I can think of off the top of my head.

  • Install the same versions on the new server,
  • copy the backed up files/databases to the new server
  • disconnect the old server from the network,
  • set IP and hostname on the new server and connect it to the network
  • start icinga2 and see what happens.

Anything after that depends heavily on your setup and you will most likely run into config issues.

1 Like