Checkmk
to checkmk.com

Once you have installed Checkmk on a Linux server, in this article you will learn what still needs to be done to create, start and fill a site with life by adding the first devices to the monitoring — and to complete everything in just a few steps.

Note: If you are running Checkmk with one of our appliances or in a Docker container instead of on a Linux server, the site management runs differently to as described below: Checkmk appliances are administered via a special web interface that also covers the creation of sites, which is explained in the article on the appliance. With the installation as a Docker container, the site cmk is set up and started at the same time. In both cases, you can therefore jump straight to the section logging on to the web interface.

1. Creating a site

Create the first site as root with the omd create command followed by the name of the site. The name may only consist of letters and numbers. The convention here is lower case letters. In the User guide, we use the name mysite in our examples.

root@linux# omd create mysite
Adding /opt/omd/sites/mysite/tmp to /etc/fstab.
Creating temporary filesystem /omd/sites/mysite/tmp...OK
Updating core configuration...
Generating configuration for core (type nagios)...
Precompiling host checks...OK
Executing post-create script "01_create-sample-config.py"...OK
Restarting Apache...OK
Created new site mysite with version 2.1.0p1.cre.

  The site can be started with omd start mysite.
  The default web UI is available at http://linux/mysite/

  The admin user for the web applications is cmkadmin with password: YzxfoFZh
  For command line administration of the site, log in with 'omd su mysite'.
  After logging in, you can change the password for cmkadmin with 'htpasswd etc/htpasswd cmkadmin'.

As you can see in the command output, when a site is created, an administrative Checkmk user with the name cmkadmin is automatically created, which you can use to log in to the Checkmk web interface. cmkadmin has been given a random password. Make a note of this password — or change it. You will learn how to do this in the paragraph following the next paragraph.

Once you have created the new site, subsequent administration is no longer carried out as the root, but instead as the site user. The easiest way to become a site user is with the following command:

root@linux# su - mysite
OMD[mysite]:~$

As a site user, you can change the cmkadmin user’s password as follows:

OMD[mysite]:~$ htpasswd -m etc/htpasswd cmkadmin
New password: ****
Re-type new password: \**
Updating password for user cmkadmin

2. Starting a site

A site can be started or stopped. Newly-created sites begin their lives in a stopped state. Therefore, you must start the site with a command:

OMD[mysite]:~$ omd start
Creating temporary filesystem /omd/sites/mysite/tmp...OK
Starting agent-receiver...OK
Starting mkeventd...OK
Starting rrdcached...OK
Starting npcd...OK
Starting nagios...OK
Starting apache...OK
Starting redis...OK
Initializing Crontab...OK

Tip: By the way, creating and starting a site is covered in more detail in the Beginner’s guide.

3. Logging on to the web interface

If your Checkmk server is called myserver and your site is called mysite, the web interface is accessed with http://myserver/mysite/ in the browser:

Checkmk login dialogue.

Now log in with the user name cmkadmin and the random password or with the password you edited at the beginning. This will take you to the start page for Checkmk.

Note: In the Docker container you can find the cmkadmin user’s password in the log files for the container. When using the appliance, you set the user name and password yourself when creating the site.

4. Installing an agent on the monitoring server

The very first host you include in the monitoring is the monitoring server itself. To do this, you first need a monitoring agent.

Note: On the appliances this Checkmk agent is already pre-installed.

When working with your own Linux server or in a Docker container you must install the agent yourself.

To install the agent, you need the appropriate package file — in RPM file format for SLES and Red Hat Enterprise Linux (RHEL) based systems, and in the DEB file format for Debian and Ubuntu. You can obtain this package file in several ways, for example by downloading it from the Checkmk interface:

Download page with the RPM/DEB packages.

In this case, the host where the agent is to be installed is the monitoring server itself, so a download is not necessary, and you can directly access the package files, which can be found in your site directory (/omd/sites/mysite/) under ~/share/check_mk/agents/:

OMD[mysite]:~$ ls -la share/check_mk/agents/check-mk-agent*
-rw-r--r-- 1 root root 4537960 May 31 20:52 share/check_mk/agents/check-mk-agent-2.1.0p1-1.noarch.rpm
-rw-r--r-- 1 root root 4291230 May 31 20:52 share/check_mk/agents/check-mk-agent_2.1.0p1-1_all.deb

Install the package — with rpm -U for the RPM file or with dpkg -i for the DEB file, for example like this:

root@linux# dpkg -i /omd/sites/mysite/share/check_mk/agents/check-mk-agent_2.1.0p1-1_all.deb

For detailed instructions on installing the agent, see the Linux agent article.

5. Registering the monitoring server as a host

Trust and TLS-encrypted data exchange between agent and Checkmk site are mandatory from Checkmk version 2.1.0 — even when they are communicating on the same host (the monitoring server). Therefore, after installation, the next step is to register the agent, or more precisely the Agent Controller, with the site.

Before a host can be registered, it must exist in the Checkmk configuration environment. The management of hosts to be monitored can be found in the Setup menu, more specifically at Setup > Hosts > Hosts. Click Add host, enter localhost as Hostname and click Save & go to folder.

Registration is then done by calling the Agent Controller cmk-agent-ctl on the command line. For the command you need the names of the Checkmk server (linux in the example), the Checkmk site (mysite) and the host (localhost) as has just been set up in Checkmk. Completing the options are the name (and password) of a Checkmk user with access to the REST API. You can use cmkadmin to do this:

root@linux# cmk-agent-ctl register --hostname localhost --server linux --site mysite --user cmkadmin

If the specified values were correct, the server certificate will be displayed and you will be prompted to confirm the identity of the Checkmk site with Y. Then you will be asked for the password for the user cmkadmin. If no error message is displayed, the encrypted connection will have been successfully established.

The registration process is described in more detail in the Linux agent article.

6. Adding the host to the monitoring

The following actions are again performed via the Checkmk interface, in the host’s properties, which you access via Setup > Hosts > Hosts and then Icon to edit a list entry.Edit the properties of this host.

Click Save & go to service configuration:

List of services found on the host for adding in monitoring.

In this list, add all services found but not yet monitored (Undecided) to the monitoring by clicking Accept all.

Then click on the orange button with the number of changes at the top right of the main page to activate the changes on the following page with Activate on selected sites. This takes the new host and its services from the configuration environment into the active monitoring environment.

That’s it!

The server will now be monitored with with default settings, which you can see if you display all hosts in the Monitor menu with Monitor > Overview > All hosts and then select the new localhost:

List of services in monitoring.

7. Adding more servers and network devices

You can include additional devices into your monitoring in the same way. Here are a couple of tips:

  • To monitor Windows, use the agent in the MSI package. The Windows agent installs the 'Check MK Service' under Windows.

  • To monitor SNMP devices such as routers, switches, printers or hardware sensors, use the interface for monitoring already built in by the manufacturer: the SNMP agent. For this, when setting up the host for an SNMP device, select No API integrations, no Checkmk agent as Checkmk agent / API integrations. Instead, for the SNMP value select SNMP v2 or v3. If the SNMP community is not public, then enter it under SNMP credentials.

  • If the host name cannot be resolved via DNS, activate the IPv4 address parameter in the host properties and enter the IP address by hand.

Tip: If you ever get stuck, we hope you will find the answer to your question in this User guide. If you have questions concerning details on the Checkmk interface, you can also display the context-sensitive inline help: on the main page in the Help menu with Help > Show inline help.

On this page