Upgrading checkmk server's underlying OS

Hi - so we need to move our nagios servers from Ubuntu 16 to ubuntu 18

Is there a well understood procedure for this? I can think of various approaches such as:

  • Stopping the site,
  • updating ubuntu
  • Installing the matching U18 version of checkmk
  • restarting the site

As it appears others have done when moving from U14 to U16.

Alternatively I could perhaps disable the site, backup the data, install a new copy of checkmk on a new machine, restore the site from checkmk’s backup?

Adding to the complexity is that this a three server distributed system - so should I no the ‘head’ node first? Or does the order not matter.

Any advice from anyone who’s done this recently would be very gratefully received.

Thanks
Dave

You cannot upgrade the distribution with the checkmk server package installed as this package depends on the distribution version.
To remove the checkmk package you need to remove all sites first.
To remove all sites you have to make a backup first.
After upgrading the distribution you need to install the same checkmk version (but for the new distribution).
After that you can restore your sites.

My procedure for a distribution upgrade like 16.04 to 18.04 or 20.04 looks like this

  • Upgrade CMK on the old to the newest version there like - 1.6.0p22 (if a 1.6 was used there)
  • Stop the site
  • Inside the site directory - remove the version symlink
  • Uninstall all CMK versions
  • Upgrade the operating system
  • Install CMK with the same version as before for the new distribution
  • Restore the symlink inside the site directory (as site user)
  • Start the OMD site

All this without extra site backup what can be a huge time saving :slight_smile:
But with a little bit risk to lose the site if you have no backup

1 Like

For this I create a personal repository using “reprepo” with the check_mk packages and add it to sources.list.

apt_repository [MHC SoftWare Wiki] (Geman, sorry)

After the successful dist upgrade it’s required to upgrade check_mk manually by something like:

apt install check-mk-managed-2.0.0p1/buster

The complete process is simple with a repository, here for a dist upgrade from Debian stretch to buster:

sed -i 's/stretch/buster/g' /etc/apt/sources.list
apt update
apt upgrade
apt dist-upgrade
apt install check-mk-managed-2.0.0p1/buster
reboot

I did this today 5 times without any problems :slight_smile:

It is interesting to see the different guidelines to handle this.

I would like to upgrade from ubuntu 18.04 to 20.04 as well, the only info I found was a private blog post:

If I understand it correct this is basicly the same as your procedure @andreas-doehler?

Yes only a little bit more in detail compared to my short version.

Yes, this does not require a restore. But do make a backup before and never run omd cleanup as a shortcut to uninstall the checkmk packages. This will remove everything in /opt/omd including site data in this situation.

1 Like

This is a command i don’t used since first time omd usage :smiley:

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact @fayepal if you think this should be re-opened.