Check_MK是一款通用的Nagios/Icinga數據採集插件,主要由三個子項目組成。它採用了新的方法從操作系統和網絡組件中收集數據和淘汰老式的NRPE、check_by_ssh、NSClient和check_snmp。其優點能夠自動檢測主機上的監控項目,並且在監控端的CPU使用率也顯著減少。其遵循CPL v2,是開源的免費軟件。
官網:https://checkmk.com/
docker啟動
docker container run -dit -p 8080:5000 -p 8000:8000 --tmpfs /opt/omd/sites/cmk/tmp:uid=1000,gid=1000 -v monitoring:/omd/sites --name monitoring -v /etc/localtime:/etc/localtime:ro --restart always checkmk/check-mk-raw:2.1.0p18
每次啟動時密碼不會一樣 如何查看密碼需要執行docker logs containerID
[root@dev-rancher tony]# docker logs 8303959da106 CREATING SITE 'cmk' Adding /opt/omd/sites/cmk/tmp to /etc/fstab. Going to set TMPFS to off. Temporary filesystem already mounted Updating core configuration... Generating configuration for core (type nagios)... Precompiling host checks...OK [root@dev-rancher tony]# docker logs 8303959da106 CREATING SITE 'cmk' Adding /opt/omd/sites/cmk/tmp to /etc/fstab. Going to set TMPFS to off. Temporary filesystem already mounted Updating core configuration... Generating configuration for core (type nagios)... Precompiling host checks...OK Executing post-create script "01_create-sample-config.py"...OK Created new site cmk with version 2.1.0p18.cre. The site can be started with omd start cmk. The default web UI is available at http://8303959da106/cmk/ The admin user for the web applications is cmkadmin with password: NccBs23O For command line administration of the site, log in with 'omd su cmk'. After logging in, you can change the password for cmkadmin with 'cmk-passwd cmkadmin'. WARNING: You have to execute 'omd update-apache-config cmk' as root to update and apply the configuration of the system apache. WARNING: You have to execute 'omd update-apache-config cmk' as root to update and apply the configuration of the system apache. STARTING XINETD Starting internet superserver xinetd [ OK ] STARTING SITE Temporary filesystem already mounted 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 STARTING CRON CONTAINER STARTED
密碼在這行 The admin user for the web applications is cmkadmin with password: NccBs23O
瀏覽器開啟
http://localhost:8080
設定roles Setup > VM. Cloud. Container
Setup > Agents > VM. Cloud. Container
選擇 VMware ESX via vSphere
Add rule
填入vSphere的資訊
SSL certificate checking 選 Deactivated
rule建立完成
Setup > Hosts
Add host
填入vSphere的域名 or ip
等待建立
按Accecpt all
host建立完成
Monitor > Overview > All hosts > 192.168.1.5 > Sservices of Host
可以看到相關的虛擬機狀態