We use OMD/Check_MK to monitor our IT infrastructure. It is easy to use and we always know the status of our network components, servers, printers, etc. Until now we used the “old-stable” version (1.2.8), but the CPU usage increased significantly, so it was time to upgrade to the current stable version (1.4.0). Today I want to show you how to update Check_MK and what to consider.
With Check_MK you can manage several instances. These are called “sites”. It is possible to install several versions of Check_MK in parallel. Each instance can use one of the installed versions. So the software upgrade is a little different from what you may be used to.
Before we can upgrade our instance to the new version, we must first update Check_MK. We download the latest version for Ubuntu 16.04 (1.4.0).
$ wget https://mathias-kettner.de/support/1.4.0p26/check-mk-raw-1.4.0p26_0.xenial_amd64.deb
Then we have to install the package and any missing dependencies:
$ sudo dpkg -i check-mk-raw-1.4.0p26_0.xenial_amd64.deb$ sudo apt install -f
Now we can use omd versions
to see if the new version is set as default:
root@omd:~# omd versions1.2.8p13.cre1.4.0p26.cre (default)
The new version of Check_MK is now installed, but our “site”, the monitoring instance, still uses the old version. So we have to update it as well. To do this, we switch the user to our instance with
root@omd# su — myInstance
First, we stop our instance:
omd stop
After that we can perform the update:
$ omd update
When upgrading, we are asked a few questions to resolve conflicts in the configuration. For us it was mainly adjustments of file permissions for some files. Here you cannot give a general recommendation, which answer is the right one, but as long as it is not about own adjustments, you can usually take over the new version or the new file permissions.
With omd version
we can still check if the current version is used. Then we restart our instance:
$ omd start
If we now open Check_MK in the browser (https://monitoring.server/myInstance), we may see the following warning:
Of course, the plugins have also been updated or replaced by the update. Over the next few hours, there will therefore be repeated warnings about inactive or vanished services. Check_MK also warns of incompatible changes (see picture). By clicking on “Show unacknowledged incompatible werks” we can view these changes and accept them by clicking “Acknowledge all” again.
We use a plugin that sends a message to our Mattermost #monitoring channel in case of a problem. The plugin was not moved to the new Check_MK version, so some manual work is required. We have to copy the plugin to the right place and adjust the rights.
$ cp /opt/omd/versions/1.2.8p13.cre/share/check_mk/notifications/slack /opt/omd/versions/1.4.0p26.cre/share/check_mk/notifications/slack$ chmod +x /opt/omd/versions/1.4.0p26.cre/share/check_mk/notifications/slack
If not yet available, we also have to install the following package:
$ apt install python requests
Now the plugin appears again under WATO → Notifications.
After the upgrade Check_MK runs smoothly again. Check_MK is a great project and it helps us a lot to keep an eye on our network, our firewall and our devices. So we can often recognize problems before someone else notices them 🙂
What software do you use to monitor your IT infrastructure?
Originally published at openschoolsolutions.org. Sign up to our newsletter to get access to a FREE PDF with great open source apps for your classroom or follow @OpenSchoolZ on Twitter.