Ep. 6: Checkmk aktualisieren und mehrere Instanzen verwenden
[0:00:00] | Hi, today we're updating our Checkmk server. |
[0:00:13] | Welcome back to the Checkmk channel. |
[0:00:14] | In today's episode, we're talking about updates. Specifically on how to update your Checkmk case site to a newer version. We're also going to take a look on how to run multiple instances or sites on one system. |
[0:00:28] | The first thing we would need to do is download the new version of Checkmk from our website. When you're on checkmk.com, click the download button on the top right. So now we're on the download page, you see that the free edition is already pre-selected that's because when we install Checkmk we also picked this one. |
[0:00:46] | So now let's choose the platform and our version Ubuntu 20.04, type in our email address, and hit the download button. Now we're ready to install or update Checkmk. Let's switch back to the CLI. |
[0:01:10] | So when a download is complete, we can copy over the file to our VM, and once again we do that using 'scp'. So 'scp' followed by the file name and then the destination. There will be 'root' at the IP address of our VM, and we'll put it in the 'tmp' folder again. Okay, so it's copied over now it's time to log in to the VM using 'ssh', navigate to the 'tmp 'folder. |
[0:01:51] | Okay, you see that the file is there now it's time to install. We can do that once again using 'apt install. We have installed the new version of Checkmk, but our site has not been updated yet to this version. This is not a bug but rather an important feature of Checkmk because this allows you to run multiple versions in parallel. So the next thing we need to do is upgrade our site to the new version. |
[0:02:27] | If you type the command, 'omd version' you will see the latest installed version of Checkmk on the system. More interesting is the command, "omd versions" with an extra "s". |
[0:02:42] | This will show you a list of all Checkmk versions that are installed on this system, You see that there is also a default one, this is always the latest or the most recently installed version and this is also the version used when you create a new site. |
[0:02:59] | You also see that there is a patch nine this is the version we used in the first episode to install Checkmk initially. Let me quickly clear the screen. |
[0:03:10] | With the command, 'omd sites' you will see all the sites on this system and you see that we are still running patch level 9. And you can also run multiple sites at the same system and how that works I will show you later on in this video. |
[0:03:25] | For now, let's just update this site to the latest version. Before we update the site we first need to stop it. But let's quickly check the status. |
[0:03:40] | By the way, I ran 'omd status' as root that means that I always need to append the site name. When you are logged in as the site user and you can just type in 'omd status' and it will show you the status. |
[0:03:52] | Okay, the site is running. Now let's quickly stop it, 'omd stop' followed by the site name. Okay, the site has been stopped, this is always a must when you update. Okay to update just type 'omd update', followed by the site name. |
[0:04:22] | Okay, now here in this notice you see that we're about to update from p9 to p11, if you have more than two versions installed you will see an additional question which let you pick the version you want to update too. I'm just gonna press enter and update. |
[0:04:40] | So now some configuration files are updated. And we should be updated in a few seconds already. Okay, the site has been updated. |
[0:04:54] | Now we can just simply start the site again, 'omd start' followed by the site name. Okay, everything is up and running now we can switch over to the browser and check if we're actually running the new version. So we go to the IP address of the VM. |
[0:05:27] | And you see here at the bottom we're running p12, p11 sorry. And everything seems to be working. In the beginning of this video, I told you I would show you how to run multiple sites on one Checkmk server. This is actually really easy, like in the first episode we just need to run the 'omd create' command again. |
[0:05:53] | Okay, let's clean this command line. |
[0:05:56] | So now to create our second site simply type 'omd create' and let's give it a name, "checkmk_testing ". Now unlike what I showed you in the first episode, we are going to change the password on a command line instead of in a user interface. To do that we are logging in as the site user, so we type in 'su -' and then the site name or the user name. |
[0:06:37] | And then we can copy this command here. And paste now we simply type in our new password. Okay, the password has been changed. Now let's start the site and we can do that by simply typing 'omd start' and we don't need to append the site name because we're now logged in as the site user itself. |
[0:07:08] | Okay, the site has been started now let's switch again to the browser. |
[0:07:14] | And login to the new site, so again we go to the IP followed by the '/' and followed by the site name which is "checkmk_testing". |
[0:07:29] | Okay, now we can simply log in as 'cmkadmin' with the new password. And you see we have a completely empty site like in the first episode. These two sites are now running in parallel on the same system. They don't influence each other in any way except for the fact that they use resources from the same server. |
[0:07:52] | So that's kind of like virtualization but a lot simpler so because you don't need VMware or anything, you simply run two instances of Checkmk in parallel. |
[0:08:01] | In practice, this is quite useful because this lets you test out stuff, for example, a new version of Checkmk, and only once you're satisfied with the result, you update your production environment to this new version. |
[0:08:15] | So this was it for today, you see the updating procedure is quite easy. Once again if this video was helpful to you please like and subscribe the channel. See you next time. |
Wollen Sie mehr über Checkmk erfahren? Dann nehmen Sie an unserem Webinar "Einführung in Checkmk" teil!