HowtoForge

Easy guide to monitoring your systems with Checkmk

This tutorial will show you how to take your first steps with Checkmk, a comprehensive IT monitoring system that identifies issues across your entire IT infrastructure. Checkmk monitors servers, applications, networks, cloud environments and many other systems. I will show you how to install Checkmk on Ubuntu 20.04 and add hosts (systems to be monitored) to the monitoring. Checkmk also runs on other Linux distributions such as Debian, RHEL, CentOS or SLES, in a Docker container, or also as a virtual appliance. You can download the latest version for all platforms from the official Checkmk website. For this tutorial I will use the Checkmk Raw Edition, which is completely open source.

The goal of this article is to give you a quick start into Checkmk and the world of IT monitoring. Checkmk comes with numerous powerful features, and I recommend checking the documentation online for further reference. You will see that it is fairly easy to set up a first monitoring, as many configuration tasks are performed automatically, and thanks to the around 2,000 official monitoring plug-ins, Checkmk supports many systems right out of the box.

Prerequisites

If you use an Ubuntu server, it should at least be on version 16.04 or higher to host your monitoring. The Ubuntu server I used has 4 CPU cores and 8 GB RAM, which is more than enough for a small monitoring environment. You also need a client to download Checkmk and send the package to your host server. The client must also have root access to your monitoring host server.

Download the Checkmk Raw Edition

There are two options for using Checkmk for free: You can go for the Checkmk Raw Edition which is completely open source, or start with the Checkmk Free Edition. The Free Edition allows you to test all of the additional features included with the Enterprise Edition. After 30 days, the Free Edition will be limited to 25 hosts. This tutorial uses the Raw Edition.

Installing the Checkmk package

OMD is short for Open Monitoring Distribution, an open source project founded by Checkmk founder Mathias Kettner. Checkmk uses OMD for instance management.

Creating a first Checkmk monitoring site

At this point, you are done on the terminal, and this tutorial will continue on the Checkmk user interface. With these last few steps, a few things will have happened in the background: On your server you created a new user (this user is known as the site user), and a group with the name of the site. A directory for the site is created under /omd/sites, (e.g.
/omd/sites/checkmk_demo). Checkmk also copied its default configuration into the new directory and a user with the name 'cmkadmin' has been created for the Checkmk web interface.

Changing your password in the user interface

No one can force you to change the password, of course, but I really recommend it. It´s just a few clicks and you can use a strong password to secure the access to your monitoring.

Add hosts to your Checkmk site

In this tutorial I will show you how to use the Checkmk agents, which is a very efficient method for server monitoring.

As a first host, you should add the server you are hosting your monitoring on. Checkmk supports several ways of monitoring servers, and the best method for server monitoring is usually by using the Checkmk agents. In the sidebar on the left, you will find a button with a gearwheel called Setup. This is the place where all of the configuration is performed, and you will also find the monitoring agents there.

You can test if the agent works by running the check_mk_agent command in the terminal on your server. You should then see the agent output.

You have just successfully added a first host to the monitoring. You can add more hosts in the same way. Checkmk does not depend on its agents. When adding network devices you can follow most of these same steps as well. If you want to monitor network devices with SNMP for instance, you will need to customise that under 'Monitoring agents' after clicking on 'Add host', switching the default value to 'SNMP' and adding your SNMP details (SNMP version and credentials).

Checkmk will always ask for confirmation of changes made to the monitoring. This is a safety mechanism and it allows you to review any changes before they affect your monitoring. For this very small monitoring environment, this step does not look like a big deal, but you should keep in mind that Checkmk is often used to monitor distributed environments with many users. This way, a monitoring administrator always stays on top of things and can verify any change made to the monitoring. New hosts and other changes in the configuration initially have no effect on the monitoring, you need to activate these before they go into production.

The next steps for a happy monitoring

This tutorial covered the basics of working with Checkmk, but your real monitoring experience is only just starting here. Of course it is possible to simultaneously add multiple hosts to a monitoring in Checkmk. You may have noticed that Checkmk provides agents for almost all operating systems, so you can go ahead and add more hosts as required. The procedure is similar for other systems.

Easy guide to monitoring your systems with Checkmk