1. Preparation before installation
-
Update the system and install dependencies:
sudo apt update && sudo apt upgrade -y sudo apt install -y wget apt-transport-https
2. Install Checkmk (open source version)
-
Add Checkmk repository:
wget /support/1.6.0p30/check-mk-raw-2.1.0p30_0.jammy_amd64.deb sudo dpkg -i check-mk-raw-2.1.0p30_0.jammy_amd64.deb sudo apt install -f
-
Create a monitoring instance:
sudo omd create monitoring sudo omd start monitoring
-
Open firewall port (HTTP/HTTPS):
sudo ufw allow 80/tcp sudo ufw allow 443/tcp sudo ufw reload
3. Access the web interface
-
Visit
http://your-server-ip/monitoring
, use the default credentials to log in:-
username:
cmkadmin
-
password: Password generated during installation (view
/omd/sites/monitoring/etc/htpasswd
)。
-
Configure the monitored device
1. Monitor Linux servers
-
Install Checkmk Agent on the target server:
wget http://<checkmk-server-ip>/monitoring/check_mk/agents/check-mk-agent_2.1.0p30-1_all.deb sudo dpkg -i check-mk-agent_*.deb sudo systemctl restart xinetd # Make sure the xinetd service is running
-
Adding hosts in Checkmk web interface:
-
Navigate toSetup > Hosts > Add host。
-
Enter the host name and IP address and selectCheckmk AgentMonitoring method.
-
ClickSave & Run Service Discovery, apply changes.
-
2. Monitor network equipment (switch/router/firewall)
-
Enable SNMP on the device(Take Cisco equipment as an example):
! Enter configuration mode configure terminal snmp-server community YourCommunityString RO# Set read-only community strings snmp-serverhost <checkmk-server-ip> version 2c YourCommunityString exit
-
Add SNMP device in Checkmk:
-
Navigate toSetup > Hosts > Add host。
-
Enter the device name and IP address and selectSNMPMonitoring method.
-
Configure SNMP version (such as v2c) and community strings.
-
ClickSave & Run Service Discovery, check the interface traffic monitoring item (such as
Interface statistics
)。
-
3. Monitoring fortress machine (taking Linux fortress machine as an example)
-
Monitoring via SSH or Agent:
-
If SNMP is supported, add it according to network device.
-
If SNMP is not supported, use Checkmk Agent (same as Linux server steps).
-
Configure interface traffic monitoring
-
Enable interface monitoring in service discovery results:
-
Click on the host pageService Discovery。
-
Check the interface to monitor (such as
Interface Ethernet0
)。 -
ClickActivateApply changes.
-
-
Custom traffic thresholds:
-
Navigate toSetup > Hosts > Services, select interface service.
-
ReviseCheck parametersSet an alarm threshold (such as an alarm that the bandwidth utilization rate exceeds 80%).
-
Timely backup platform data
1. Manual backup
sudo omd backup monitoring # Backup files are stored in `/var/lib/omd/backups/` by default
2. Automatic backup (Cron task)
-
Create a backup script:
sudo nano /usr/local/bin/checkmk_backup.sh
#!/bin/bash omd backup monitoring > /dev/null find /var/lib/omd/backups/ -name "*." -mtime +30 -exec rm {} \;
-
Set up timing tasks:
crontab -e
0 2 * * * /usr/local/bin/checkmk_backup.sh # Every morning2Click Backup
Daily maintenance matters
-
Monitoring log:
-
Checkmk log path:
/omd/sites/monitoring/var/log/
. -
examine
and
Is there any error?
-
-
Update Checkmk:
sudo apt update sudo apt install check-mk-raw-<New version number> sudo omd update monitoring
-
Clean up old data:
-
Adjust data retention policy in the web interface:Setup > General > Global Settings > History。
-
Things to note
-
SNMP Security:
-
Use SNMPv3 instead of v2c (Configure Encrypted User).
-
Restrict SNMP access to IP (via device ACL or firewall).
-
-
Permission Management:
-
Using CheckmkRoles & UsersFunctional assignment minimum permissions.
-
Avoid using default passwords and change credentials regularly.
-
-
High availability:
-
If there are more than 500 monitoring devices, consider distributed deployment (master-slave monitoring node).
-
-
Resource monitoring:
-
Monitor Checkmk server resources (CPU/memory/disk) to avoid data loss due to excessive load.
-
-
Firewall rules:
-
Allows Checkmk server to access the SNMP (UDP 161) and Agent (TCP 6556) ports of the device.
-
Troubleshooting example
-
SNMP monitoring failed:
snmpwalk -v2c -c YourCommunityString <device IP> 1.3.6.1.2.1.1.1.0 # Test SNMP connectivity
-
Agent has no data:
telnet <Target server IP> 6556 # Check whether the Agent port is open