CheckMK Server Installation and Configuration on Debian 12
This tutorial is intended for advanced users with Linux knowledge. We will guide you through the process of installing and configuring a CheckMK server on a Debian 12 server.
Prerequisites
Before we begin, make sure you have the following:
- A Debian 12 Server
- SSH access to the server
- Basic knowledge of Linux
Step-by-Step Guide
Step 1: Update System Packages
1sudo apt update
2sudo apt upgrade
- First, update the package lists and upgrade existing packages to their latest versions.
Step 2: Install Required Dependencies
1sudo apt install apache2 libapache2-mod-python libapache2-mod-php mariadb-server python3 python3-pip
- Install Apache web server, MariaDB, and Python dependencies required for CheckMK.
Step 3: Install CheckMK Raw Edition
1wget https://download.checkmk.com/checkmk/2.2.0p9/check-mk-raw-2.2.0p9_0.bookworm_amd64.deb
2apt install /check-mk-raw-2.2.0p9_0.bookworm_amd64.deb
3apt install ./check-mk-raw-2.2.0p9_0.bookworm_amd64.deb
- Install the CheckMK Raw Edition package.
Step 4: Configure CheckMK
1sudo omd create mysite
2sudo omd start mysite
- Create a CheckMK site called 'mysite' and start it.
Created new site intercolo with version 2.2.0p9.cre.
The site can be started with omd start mysite.
The default web UI is available at http://monitoring/mysite/
The admin user for the web applications is cmkadmin with password: XXXXXXX
For command line administration of the site, log in with 'omd su mysite'.
After logging in, you can change the password for cmkadmin with 'cmk-passwd cmkadmin'.
Step 5: Access CheckMK Web Interface
Open a web browser and navigate to http://your_server_ip/mysite
. Log in with the default username and password (cmkadmin
/XXXXXXX
). Password is in the message shown after the omd create mysite
command.
Step 6: Add a Domain and Enable HTTPS with Let's Encrypt
1. Install Certbot for Let's Encrypt
sudo apt install certbot python3-certbot-apache
- Install Certbot and the Certbot Apache plugin for managing Let's Encrypt certificates.
2. Obtain a Let's Encrypt Certificate
Run Certbot to obtain a Let's Encrypt SSL certificate for your domain:
sudo certbot --apache -d monitoring.intercolo.net
Follow the prompts to configure your SSL certificate. Certbot will automatically configure Apache to use the SSL certificate for your domain.
3. Restart CheckMK Site
sudo omd restart intercolo
- Restart the CheckMK site to apply the configuration changes.
Now, when you access https://monitoring.intercolo.net/intercolo
, it should load your CheckMK site directly with HTTPS and a Let's Encrypt certificate, and HTTP requests will be redirected to HTTPS. Please make sure to replace monitoring.intercolo.de
with your actual domain name and intercolo
with your CheckMK site name as needed.
Step 7: Add Host to monitoring
1
2wget https://monitoring.intercolo.net/intercolo/check_mk/agents/check-mk-agent_2.2.0p9-1_all.deb
Summary
In this tutorial, we covered the installation and initial configuration of a CheckMK server on Debian 12. You've learned how to update the system, install dependencies, set up a CheckMK site, and access the web interface. You can now start adding hosts and services for monitoring according to your needs.
For more advanced configurations and fine-tuning, refer to the CheckMK documentation.