Triển khai Nagios core + check_mk trên CentOS 6.4 minimal
Phần 2: Cài đặt Check_MK plugin
Check_MK là một plugin bổ trợ cho Nagios, với nhiều chức năng và giao diện trực quan hơn.
Thông tin : Check_MK
Chúng ta tiến hành cài đặt Check_MK
Bước 1: Download Check_MK
[root@lecuong.info ~]# cd /tmp
[root@lecuong.info tmp]# wget http://mathias-kettner.de/download/check_mk-1.2.2p1.tar.gz
Bước 2: Cài đặt
[root@lecuong.info tmp]# tar xvzf check_mk-1.2.2p1.tar.gz
[root@lecuong.info tmp]#cd check_mk-1.2.2p1
[root@lecuong.info check_mk-1.2.2p1]#./setup.sh
Tất cả tùy chọn để mặc định hết.
You have chosen the following directories:
Executable programs /usr/bin
Check_MK configuration /etc/check_mk cd ..
Check_MK software /usr/share/check_mk
documentation /usr/share/doc/check_mk
check manuals /usr/share/doc/check_mk/checks
working directory of check_mk /var/lib/check_mk
extensions for agents /usr/lib/check_mk_agent
configuration dir for agents /etc/check_mk
Name of Nagios user nagios
User of Apache process apache
Common group of Nagios+Apache nagcmd
Nagios binary /usr/local/nagios/bin/nagios
Nagios main configuration file /usr/local/nagios/etc/nagios.cfg
Nagios object directory /usr/local/nagios/etc/check_mk.d
Nagios startskript /etc/init.d/nagios
Nagios command pipe /usr/local/nagios/var/rw/nagios.cmd
Check results directory /usr/local/nagios/var/spool/checkresults
Nagios status file /usr/local/nagios/var/status.dat
Path to check_icmp /usr/local/nagios/libexec/check_icmp
URL Prefix for Web addons /
Apache config dir /etc/httpd/conf.d
HTTP authentication file /usr/local/nagios/etc/htpasswd.users
HTTP AuthName Nagios Access
PNP4Nagios templates /usr/local/pnp4nagios/share/templates
compile livestatus module yes
check_mk's binary modules /usr/lib/check_mk
Unix socket for Livestatus /usr/local/nagios/var/rw/live
Backends for other systems /usr/share/check_mk/livestatus
Install Event Console yes
working directory of mkeventd /var/lib/mkeventd
Proceed with installation (y/n)?
Quá trình cài đặt Check_MK xem như đã hoàn tất.
Bước 3: Khai báo các host, các thiết bị cần giám sát
[root@lecuong.info ~]# vi/etc/check_mk/main.mk
all_hosts = ['localhost', 'host1', 'host2', 'host3']
Bước 4: Lấy thông tin từ các host
[root@lecuong.info ~]#cmk -I
Bước 5: Tích hợp check_mk vào Nagios
[root@lecuong.info ~]#check_mk -O
Generating Nagios configuration...OK
Validating Nagios configuration...OK
Precompiling host checks...OK
Reloading Nagios...OK
Bước 6:
Khởi động lại Nagios và truy cập vào trang quản lý tại địa chỉ :
http://ip-address/check_mk ( thay thế cho ip-address/nagios)
Life is something that no one can teach you. You have to learn it.
Follow him on
Bài viết liên quan:
Check_MK
,
Infrastructure Monitoring
,
Nagios
Ai biết fix lỗi này không ạ?
ReplyDeleteLivestatus problem: Cannot connect to 'unix:/var/log/nagios/rw/live': [Errno 13] Permission denied
Em cảm ơn