Monitoring Guide

    Self-Hosted Checkmk

    Deploy Checkmk, the powerful enterprise-grade monitoring solution with auto-discovery, on RamNode VPS. Comprehensive infrastructure visibility with minimal configuration.

    Ubuntu 24.04 LTS
    Checkmk Raw Edition
    ⏱️ 20-30 minutes

    Why Checkmk?

    Checkmk is a powerful, enterprise-grade monitoring solution that provides comprehensive visibility into your infrastructure, applications, and services.

    Auto-discovery of services and applications
    Agent-based and agentless monitoring
    Low resource overhead architecture
    Thousands of built-in checks + custom support
    Modern, responsive web interface
    Flexible alerting (Email, Slack, PagerDuty)

    Prerequisites

    Requirements

    • • Ubuntu 24.04 LTS installed
    • • Root or sudo access
    • • Domain name (optional, for SSL)
    • • Basic Linux command line familiarity

    System Requirements

    HostsRAMCPUDisk
    Up to 502GB2 cores20GB
    50-5004GB4 cores50GB
    500+8GB+8+ cores100GB+
    1

    Initial Server Setup

    Connect to your VPS and update the system:

    Update System
    sudo apt update && sudo apt upgrade -y
    Set Hostname
    sudo hostnamectl set-hostname monitoring.yourdomain.com
    Configure Timezone
    sudo timedatectl set-timezone America/New_York

    Installation

    1

    Install Dependencies

    Install required packages:

    Install Dependencies
    sudo apt install -y wget gnupg2 apt-transport-https software-properties-common
    2

    Download Checkmk

    Download the latest Checkmk Raw Edition package:

    Note: Visit the official Checkmk download page to get the latest version for your operating system.

    Download Package
    cd /tmp
    wget https://download.checkmk.com/checkmk/2.3.0p23/check-mk-raw-2.3.0p23_0.noble_amd64.deb
    3

    Install Checkmk

    Install the package with dependencies:

    Install Package
    sudo apt install -y ./check-mk-raw-2.3.0p23_0.noble_amd64.deb

    The installation will set up Apache, configure system services, and prepare the Checkmk environment.

    Create Monitoring Site

    1

    Create Your First Site

    Checkmk uses "sites" to organize monitoring instances:

    Create Site
    sudo omd create monitoring

    This 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!

    2

    Start the Site

    Start your monitoring site:

    Start Site
    sudo omd start monitoring
    Verify Status
    sudo omd status monitoring

    All services should show as "running":

    Expected Output
    mkeventd:    running
    liveproxyd:  running
    mknotifyd:   running
    rrdcached:   running
    cmc:         running
    apache:      running
    dcd:         running
    crontab:     running
    -----------------------
    Overall:     running

    Firewall Configuration

    1

    Configure UFW

    Allow HTTP, HTTPS, and agent traffic:

    Firewall Rules
    # 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 enable

    Web Interface

    1

    Access the Dashboard

    Open your browser and navigate to:

    Dashboard URL
    http://your-server-ip/monitoring/

    Log in with:

    • Username: cmkadmin
    • Password: The password shown during site creation
    2

    Change Admin Password

    Immediately change the default password via the web interface:

    1. Click on your username (cmkadmin) in the top right corner
    2. Select "User profile"
    3. Click "Change password"
    4. Enter and confirm your new secure password
    5. Click "Save"

    Alternatively, via command line:

    Change Password CLI
    sudo su - monitoring
    cmk-passwd cmkadmin

    SSL Configuration

    1

    Install Certbot

    Install Let's Encrypt for SSL:

    Install Certbot
    sudo apt install -y certbot python3-certbot-apache
    2

    Obtain SSL Certificate

    Get and install the certificate:

    Run Certbot
    sudo certbot --apache -d monitoring.yourdomain.com

    Follow the prompts to complete setup. Certbot will automatically configure Apache for HTTPS and set up auto-renewal.

    Add Hosts

    1

    Install Local Agent

    First, add the Checkmk server itself as a monitored host:

    Switch to Site User
    sudo su - monitoring
    Install Local Agent
    exit  # Return to root/sudo user
    sudo dpkg -i /omd/sites/monitoring/share/check_mk/agents/check-mk-agent_2.3.0p23-1_all.deb
    2

    Register Host in Web UI

    Register the host in Checkmk:

    1. Navigate to Setup → Hosts
    2. Click Add host
    3. Enter Hostname: localhost and IP: 127.0.0.1
    4. Click Save & run service discovery
    5. Click Accept all to monitor discovered services
    6. Click the yellow "Activate pending changes" button
    3

    Add Remote Hosts

    Install the agent on remote servers:

    Ubuntu/Debian Remote
    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.deb
    RHEL/CentOS/Rocky Remote
    wget 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.rpm

    On the remote host, allow the agent port:

    Allow Agent Port
    sudo ufw allow from your-checkmk-server-ip to any port 6556

    Email Notifications

    1

    Configure SMTP

    Set up email alerts:

    1. Navigate to Setup → Global settings
    2. Search for "SMTP"
    3. 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
    2

    Create Notification Rules

    Configure when and how to send notifications:

    1. Go to Setup → Notifications
    2. Click Add rule
    3. Configure notification method: HTML Email
    4. Select users to notify
    5. Configure host/service filters as conditions
    6. Save and activate changes

    Dashboards

    1

    Create Custom Dashboards

    Customize your monitoring view:

    1. Navigate to Customize → Dashboards
    2. Click Create new dashboard
    3. Add dashlets for:
      • Host statistics
      • Service problems
      • Event timeline
      • Custom graphs
    4. Arrange and resize dashlets as needed
    5. Save your dashboard
    2

    Enable Automated Discovery

    Detect new services automatically:

    1. Go to Setup → Global settings
    2. Search for "Automatic service discovery"
    3. Enable periodic discovery checks
    4. Configure discovery interval (e.g., daily)
    5. Activate changes

    Application Monitoring

    1

    Docker Containers

    Monitor Docker on hosts:

    Install Docker Plugin
    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.py

    Re-run service discovery on the host to detect containers.

    2

    MySQL/MariaDB

    Monitor MySQL databases:

    Install MySQL Plugin
    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_mysql

    Create a monitoring user in MySQL:

    Create MySQL User
    CREATE USER 'checkmk'@'localhost' IDENTIFIED BY 'secure_password';
    GRANT SELECT, PROCESS, REPLICATION CLIENT ON *.* TO 'checkmk'@'localhost';

    Configure credentials:

    /etc/check_mk/mysql.cfg
    [client]
    user=checkmk
    password=secure_password
    3

    Nginx

    Enable the Nginx status module:

    Nginx Status Configuration
    server {
        listen 127.0.0.1:80;
        server_name localhost;
    
        location /nginx_status {
            stub_status on;
            allow 127.0.0.1;
            deny all;
        }
    }
    Install Nginx Plugin
    sudo cp /omd/sites/monitoring/share/check_mk/agents/plugins/nginx_status.py /usr/lib/check_mk_agent/plugins/
    4

    Apache

    Enable the Apache status module:

    Enable Apache Status
    sudo a2enmod status
    /etc/apache2/mods-enabled/status.conf
    <Location /server-status>
        SetHandler server-status
        Require local
    </Location>

    Restart Apache and re-discover services.

    Performance Tuning

    1

    Optimize Check Intervals

    Adjust check intervals for large deployments:

    1. Go to Setup → Hosts → select host → Effective parameters
    2. Find "Normal check interval for service checks"
    3. Increase from default 1 minute to 5 minutes for non-critical services
    2

    Configure RRD Cache

    Optimize data storage:

    Configure Core
    sudo su - monitoring
    omd config set CORE cmc

    Adjust RRD settings in etc/rrdcached.conf for better performance.

    Backup Strategy

    1

    Manual Backup

    Create a manual backup:

    Manual Backup
    sudo omd backup monitoring /backup/monitoring-$(date +%Y%m%d).tar.gz
    2

    Automated Backup Script

    Create an automated backup script:

    Create Script
    sudo nano /usr/local/bin/checkmk-backup.sh
    /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 -delete
    Schedule Backup
    sudo 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.sh

    Security 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

    1

    Upgrade Process

    To upgrade to a newer version:

    Upgrade Steps
    # 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 monitoring

    Troubleshooting

    1

    Agent Connection Issues

    Test agent connectivity:

    Test Agent
    cmk -d hostname
    Check Agent Response
    telnet remote-host 6556
    2

    Service Discovery Problems

    Force a full discovery:

    Force Discovery
    su - monitoring
    cmk -II hostname
    cmk -R
    3

    Check Logs

    View Checkmk logs:

    View Logs
    tail -f /omd/sites/monitoring/var/log/cmc.log
    tail -f /omd/sites/monitoring/var/log/web.log
    4

    Restart Services

    If services are unresponsive:

    Restart Site
    sudo omd restart monitoring

    Setup 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.