参考文档:http://mathias-kettner.de/checkmk.html
下载地址:http://mathias-kettner.de/download/
安装需求:
1、Nagios needs to be running
You need at least version 3.0 of Nagios. Check_MK is known to work with 3.0.X, 3.1.X and 3.2.X. It does not matter wether you use a prepacked version from your Linux distro or have compiled Nagios yourself.
2、Python
Check_MK needs Python in version 2.X (at least 2.3). Most Linux distributions include Python in their default (or even minimal) installation. If unsure, call python --version from your command line. Check_MK is not compatible with Python 3.
3、Xinetd
Check_MK needs xinetd for running the agent on the local host. Some but not all distributions include xinetd in their default installation. A package called xinetd is available in all major distributions. If xinetd is not available you can use the classical inetd as well but you have to configure it yourself. Check_MK prefes xinetd, because it supports IP address based access control out of the box and also is easier to configure.
Installation of Check_MK
root@linux# wget http://mathias-kettner.de/download/check_mk-1.2.0p2.tar.gz
root@linux# cd /root
root@linux# tar xzf check_mk-1.1.6p1.tar.gz
root@linux# cd check_mk-1.1.6p1
Now run the script ./setup.sh (do not run install_nagios.sh):
root@linux# ./setup.sh
root@linux# check_mk --version
root@linux# service nagios restart
root@linux# service httpd restart
Installing the Linux agent
root@linux# wget http://mathias-kettner.de/download/check_mk-agent-1.2.0p2-1.noarch.rpm
root@linux# wget http://mathias-kettner.de/download/check_mk-agent-logwatch-1.2.0p2-1.noarch.rpm
root@linux# rpm -i check_mk-agent-1.1.18-1.noarch.rpm
参考:http://mathias-kettner.de/checkmk_linuxagent.html
root@linux# rpm -i check_mk-agent-logwatch-1.1.18-1.noarch.rpm
参考:http://mathias-kettner.de/checkmk_logfiles.html
root@linux# vi /etc/check_mk/main.mk
all_hosts = [ "localhost" ]
root@linux# /etc/check_mk/main.mk
all_hosts = [
"localhost",
"host1", "host2", "host3",
"host4", "host5", "host6"
]
root@linux# /etc/xinetd.d/check_mk
service check_mk
{
type
= UNLISTED
port
= 6556
socket_type
= stream
protocol
= tcp
wait
= no
user
= root
server
= /usr/bin/check_mk_agent
# configure the IP address(es) of your Nagios server here:
#
only_from = 127.0.0.1 10.0.20.1 10.0.20.2
disable
= no
}
root@linux# /etc/init.d/xinetd restart
root@linux# chkconfig xinetd on
root@linux# netstat -ltn
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 0.0.0.0:6556 0.0.0.0:* LISTEN
tcp6 0 0 :::22 :::* LISTEN
root@linux# check_mk -I tcp
root@linux# check_mk_agent
root@linux# check_mk -O
Generating Nagios configuration...OK
Validating Nagios configuration...OK
Precompiling host checks...OK
Reloading Nagios...OK
root@linux# /etc/init.d/xinetd restart
http://demo.mathias-kettner.de/demo/check_mk/
Username: demo287
Password: demo
check_mk有兴趣的朋友可以看看。