Why Checkmk?
Checkmk is a powerful, enterprise-grade monitoring solution that provides comprehensive visibility into your infrastructure, applications, and services.
Prerequisites
Requirements
- • Ubuntu 24.04 LTS installed
- • Root or sudo access
- • Domain name (optional, for SSL)
- • Basic Linux command line familiarity
System Requirements
| Hosts | RAM | CPU | Disk |
|---|---|---|---|
| Up to 50 | 2GB | 2 cores | 20GB |
| 50-500 | 4GB | 4 cores | 50GB |
| 500+ | 8GB+ | 8+ cores | 100GB+ |
Initial Server Setup
Connect to your VPS and update the system:
sudo apt update && sudo apt upgrade -ysudo hostnamectl set-hostname monitoring.yourdomain.comsudo timedatectl set-timezone America/New_YorkInstallation
Install Dependencies
Install required packages:
sudo apt install -y wget gnupg2 apt-transport-https software-properties-commonDownload Checkmk
Download the latest Checkmk Raw Edition package:
Note: Visit the official Checkmk download page to get the latest version for your operating system.
cd /tmp
wget https://download.checkmk.com/checkmk/2.3.0p23/check-mk-raw-2.3.0p23_0.noble_amd64.debInstall Checkmk
Install the package with dependencies:
sudo apt install -y ./check-mk-raw-2.3.0p23_0.noble_amd64.debThe installation will set up Apache, configure system services, and prepare the Checkmk environment.
Create Monitoring Site
Create Your First Site
Checkmk uses "sites" to organize monitoring instances:
sudo omd create monitoringThis creates:
- A dedicated system user
- Site-specific configuration at
/omd/sites/monitoring - Isolated environment for all monitoring data
Important: Save the randomly generated admin password shown in the output — you'll need it to log in!
Start the Site
Start your monitoring site:
sudo omd start monitoringsudo omd status monitoringAll services should show as "running":
mkeventd: running
liveproxyd: running
mknotifyd: running
rrdcached: running
cmc: running
apache: running
dcd: running
crontab: running
-----------------------
Overall: runningFirewall Configuration
Configure UFW
Allow HTTP, HTTPS, and agent traffic:
# Allow web access
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
sudo ufw allow OpenSSH
# Allow agent communication (port 6556)
sudo ufw allow 6556/tcp
# Enable firewall
sudo ufw enableWeb Interface
Access the Dashboard
Open your browser and navigate to:
http://your-server-ip/monitoring/Log in with:
- Username: cmkadmin
- Password: The password shown during site creation
Change Admin Password
Immediately change the default password via the web interface:
- Click on your username (cmkadmin) in the top right corner
- Select "User profile"
- Click "Change password"
- Enter and confirm your new secure password
- Click "Save"
Alternatively, via command line:
sudo su - monitoring
cmk-passwd cmkadminSSL Configuration
Install Certbot
Install Let's Encrypt for SSL:
sudo apt install -y certbot python3-certbot-apacheObtain SSL Certificate
Get and install the certificate:
sudo certbot --apache -d monitoring.yourdomain.comFollow the prompts to complete setup. Certbot will automatically configure Apache for HTTPS and set up auto-renewal.
Add Hosts
Install Local Agent
First, add the Checkmk server itself as a monitored host:
sudo su - monitoringexit # Return to root/sudo user
sudo dpkg -i /omd/sites/monitoring/share/check_mk/agents/check-mk-agent_2.3.0p23-1_all.debRegister Host in Web UI
Register the host in Checkmk:
- Navigate to Setup → Hosts
- Click Add host
- Enter Hostname:
localhostand IP:127.0.0.1 - Click Save & run service discovery
- Click Accept all to monitor discovered services
- Click the yellow "Activate pending changes" button
Add Remote Hosts
Install the agent on remote servers:
wget http://your-checkmk-server/monitoring/check_mk/agents/check-mk-agent_2.3.0p23-1_all.deb
sudo dpkg -i check-mk-agent_2.3.0p23-1_all.debwget http://your-checkmk-server/monitoring/check_mk/agents/check-mk-agent-2.3.0p23-1.noarch.rpm
sudo rpm -ivh check-mk-agent-2.3.0p23-1.noarch.rpmOn the remote host, allow the agent port:
sudo ufw allow from your-checkmk-server-ip to any port 6556Email Notifications
Configure SMTP
Set up email alerts:
- Navigate to Setup → Global settings
- Search for "SMTP"
- Configure your SMTP server settings:
- SMTP server (e.g., smtp.gmail.com)
- SMTP port: 587 (TLS) or 465 (SSL)
- Authentication: Enable and enter credentials
- Encryption: STARTTLS or SSL/TLS
Create Notification Rules
Configure when and how to send notifications:
- Go to Setup → Notifications
- Click Add rule
- Configure notification method: HTML Email
- Select users to notify
- Configure host/service filters as conditions
- Save and activate changes
Dashboards
Create Custom Dashboards
Customize your monitoring view:
- Navigate to Customize → Dashboards
- Click Create new dashboard
- Add dashlets for:
- Host statistics
- Service problems
- Event timeline
- Custom graphs
- Arrange and resize dashlets as needed
- Save your dashboard
Enable Automated Discovery
Detect new services automatically:
- Go to Setup → Global settings
- Search for "Automatic service discovery"
- Enable periodic discovery checks
- Configure discovery interval (e.g., daily)
- Activate changes
Application Monitoring
Docker Containers
Monitor Docker on hosts:
sudo cp /omd/sites/monitoring/share/check_mk/agents/plugins/mk_docker.py /usr/lib/check_mk_agent/plugins/
sudo chmod +x /usr/lib/check_mk_agent/plugins/mk_docker.pyRe-run service discovery on the host to detect containers.
MySQL/MariaDB
Monitor MySQL databases:
sudo cp /omd/sites/monitoring/share/check_mk/agents/plugins/mk_mysql /usr/lib/check_mk_agent/plugins/
sudo chmod +x /usr/lib/check_mk_agent/plugins/mk_mysqlCreate a monitoring user in MySQL:
CREATE USER 'checkmk'@'localhost' IDENTIFIED BY 'secure_password';
GRANT SELECT, PROCESS, REPLICATION CLIENT ON *.* TO 'checkmk'@'localhost';Configure credentials:
[client]
user=checkmk
password=secure_passwordNginx
Enable the Nginx status module:
server {
listen 127.0.0.1:80;
server_name localhost;
location /nginx_status {
stub_status on;
allow 127.0.0.1;
deny all;
}
}sudo cp /omd/sites/monitoring/share/check_mk/agents/plugins/nginx_status.py /usr/lib/check_mk_agent/plugins/Apache
Enable the Apache status module:
sudo a2enmod status<Location /server-status>
SetHandler server-status
Require local
</Location>Restart Apache and re-discover services.
Performance Tuning
Optimize Check Intervals
Adjust check intervals for large deployments:
- Go to Setup → Hosts → select host → Effective parameters
- Find "Normal check interval for service checks"
- Increase from default 1 minute to 5 minutes for non-critical services
Configure RRD Cache
Optimize data storage:
sudo su - monitoring
omd config set CORE cmcAdjust RRD settings in etc/rrdcached.conf for better performance.
Backup Strategy
Manual Backup
Create a manual backup:
sudo omd backup monitoring /backup/monitoring-$(date +%Y%m%d).tar.gzAutomated Backup Script
Create an automated backup script:
sudo nano /usr/local/bin/checkmk-backup.sh#!/bin/bash
BACKUP_DIR="/backup/checkmk"
SITE="monitoring"
DATE=$(date +%Y%m%d)
RETENTION_DAYS=30
mkdir -p $BACKUP_DIR
omd backup $SITE $BACKUP_DIR/$SITE-$DATE.tar.gz
# Remove backups older than retention period
find $BACKUP_DIR -name "*.tar.gz" -mtime +$RETENTION_DAYS -deletesudo chmod +x /usr/local/bin/checkmk-backup.sh
sudo crontab -e
# Add this line for daily backups at 2 AM:
# 0 2 * * * /usr/local/bin/checkmk-backup.shSecurity Best Practices
Use Strong Passwords
Ensure all Checkmk users have complex passwords
Enable HTTPS
Always use SSL/TLS in production environments
Restrict Agent Access
Configure firewall rules to limit which IPs can query agents
Regular Updates
Keep Checkmk updated with security patches
Audit Logging
Enable audit logging for compliance requirements
Network Segmentation
Place monitoring infrastructure in a dedicated VLAN
Upgrading Checkmk
Upgrade Process
To upgrade to a newer version:
# Download the new version
wget https://download.checkmk.com/checkmk/2.3.0pXX/check-mk-raw-2.3.0pXX_0.noble_amd64.deb
# Stop the site
sudo omd stop monitoring
# Install the new version
sudo apt install ./check-mk-raw-2.3.0pXX_0.noble_amd64.deb
# Update the site
sudo omd update monitoring
# Start the site
sudo omd start monitoringTroubleshooting
Agent Connection Issues
Test agent connectivity:
cmk -d hostnametelnet remote-host 6556Service Discovery Problems
Force a full discovery:
su - monitoring
cmk -II hostname
cmk -RCheck Logs
View Checkmk logs:
tail -f /omd/sites/monitoring/var/log/cmc.log
tail -f /omd/sites/monitoring/var/log/web.logRestart Services
If services are unresponsive:
sudo omd restart monitoringSetup Complete!
You now have a fully functional Checkmk monitoring server on your RamNode VPS. From here, you can expand by adding more hosts, configuring custom checks, and setting up advanced alerting rules.
For more advanced configurations, consult the official Checkmk documentation.
