오픈소스 기반의 시스템 모니터링 툴인 xymon 툴 설치에 대하여 알아보겠습니다.
xymon을 설치하기 위해서 기본적으로 설치해야 할 툴, 라이브러리등이 있으며
어떤한 것들이 필요한지 살펴 보겠습니다.
- RRDTOOL : (Round Robin Database tool) 데이터를 그래프화 하여 보여주는 툴
- FPING : ping의 확장판
- PCRE : (Perl Compatible Regular Expressions) 정규표현식을 지원하는 라이브러리
- OpenSSL : 통신 암호화 기능
- OpenLdap : 네트워크상에서 디렉터리 서비스를 조회하고 수정하는 프로토콜
- Apache : 웹 서비스 툴
이외에 위의 라이브러리들을 설치하기 위하여 추가로 설치 하여야 할 라이브러리들도 있지만
부가적으로 설치되는 부분들이라 생략하겠습니다.
1. 컴파일 도구
# yum -y install gcc gcc-c++ |
2. RRDTOOL
# wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el5.rf.i386.rpm # rpm -Uvh rpmforge-release-0.5.2-2.el5.rf.i386.rpm # yum -y install rrdtool-devel |
3. FPING
# wget http://fping.org/dist/fping-3.4.tar.gz # tar zxvf fping-3.4.tar.gz # cd fping-3.4 # ./configure # make;make install
|
4. Xymon Lib
# yum -y install pcre-devel # yum -y install openssl-devel # yum -y install openldap-devel # yum -y install httpd
|
5. 사용자 추가
# useradd xymon # passwd xymon
|
6. Xymon Server
# wget http://iweb.dl.sourceforge.net/project/xymon/Xymon/4.3.10/xymon-4.3.10.tar.gz # tar zxvf xymon-4.3.10.tar.gz # cd xymon-4.3.10 # ./configure.server (설정 시 하기 내용 참고) # make; make install
# chmod go+rx /home/xymon
|
Configuration script for Xymon
This script asks a few questions and builds a Makefile to compile Xymon
Checking your make-utility Checking pre-requisites for building Xymon
Checking for fping ... Xymon has a built-in ping utility (xymonping) However, it is not yet fully stable and therefore it may be best to use the external fping utility instead. I found fping in /usr/local/sbin/fping Do you want to use it [Y/n] ? y Checking to see if '/usr/local/sbin/fping 127.0.0.1' works ... 127.0.0.1 is alive OK, will use '/usr/local/sbin/fping' for ping tests NOTE: If you are using an suid-root wrapper, make sure the 'xymond' user is also allowed to run fping without having to enter passwords. For 'sudo', add something like this to your 'sudoers' file: xymon ALL=(ALL) NOPASSWD: /usr/local/sbin/fping
Checking for PCRE ... Compiling with PCRE library works OK Linking with PCRE library works OK
Checking for RRDtool ... Not RRDtool 1.0.x, checking for 1.2.x Compiling with RRDtool works OK Linking with RRDtool works OK
Checking for OpenSSL ... Compiling with SSL library works OK Linking with SSL library works OK Checking if your SSL library has SSLv2 enabled Will support SSLv2 when testing SSL-enabled network services
Xymon can use the OpenSSL library to test SSL-enabled services like https-encrypted websites, POP3S, IMAPS, NNTPS and TELNETS. If you have the OpenSSL library installed, I recommend that you enable this.
Do you want to be able to test SSL-enabled services (y) ? y
Checking for LDAP ... Compiling with LDAP works OK LBER library not needed Linking with LDAP works OK
Xymon can use your OpenLDAP LDAP client library to test LDAP servers.
Do you want to be able to test LDAP servers (y) ? y
Checking for clock_gettime() requiring librt ... clock_gettime() requires librt
Checking for Large File Support ... Large File Support OK
Setting up for a Xymon server
What userid will be running Xymon [xymon] ? [enter]
Found passwd entry for user xymon:x:500:500::/home/xymon:/bin/bash
Where do you want the Xymon installation [/home/xymon] ? [enter]
OK, will configure to use /home/xymon as the Xymon toplevel directory
What URL will you use for the Xymon webpages [/xymon] ? [enter]
Where to put the Xymon CGI scripts [/home/xymon/cgi-bin] ? [enter] (Note: This is the filesystem directory - we will get to the URL shortly)
What is the URL for the Xymon CGI directory [/xymon-cgi] ? [enter] (Note: This is the URL - NOT the filesystem directory)
********************** SECURITY NOTICE **************************** If your Xymon server is accessible by outsiders, then you should restrict access to the CGI scripts that handle enable/disable of hosts, and acknowledging of alerts. The easiest way to do this is to put these in a separate CGI directory and require a password to access them. Even if your Xymon server is on a secured, internal network, you may want to have some operations (like disabling a host) be password- protected - that lets you see who disabled or acknowledged an alert.
Where to put the Xymon Administration CGI scripts [/home/xymon/cgi-secure] ? [enter] (Note: This is the filesystem directory - we will get to the URL shortly)
What is the URL for the Xymon Administration CGI directory [/xymon-seccgi] ? [enter] (Note: This is the URL - NOT the filesystem directory)
** Note that you may need to modify your webserver configuration. ** After installing, see /home/xymon/server/etc/xymon-apache.conf for an example configuration.
To generate Xymon availability reports, your webserver must have write-access to a directory below the Xymon top-level directory. I can set this up if you tell me what group-ID your webserver runs with. This is typically 'nobody' or 'apache' or 'www-data'
What group-ID does your webserver use [nobody] ? apache
Where to put the Xymon logfiles [/var/log/xymon] ? [enter]
What is the name of this host [localhost.localdomain] ? [enter]
What is the IP-address of this host [127.0.0.1] ? [enter]
** NOTE: Using 127.0.0.1 (loopback), but it is probably not what you want **
Where should I install the Xymon man-pages (/usr/local/man) ? [enter]
Using Linux Makefile settings
Created Makefile with the necessary information to build Xymon Some defaults are used, so do look at the Makefile before continuing.
Configuration complete - now run make (GNU make) to build the tools
|
7. Apache 구성
# vi /etc/httpd/conf/httpd.conf DocumentRoot /home/xymon/server/www 로 변경
# ln -s /home/xymon/server/etc/xymon-apache.conf xymon-apache.conf # htpasswd -c /home/xymon/server/etc/xymonpasswd admin # /etc/init.d/httpd start
|
8. xymon 서비스 등록
# cd /etc/init.d # wget http://iam8up.com/xymon-initd/xymon # chmod 755 xymon # ln -s /etc/init.d/xymon /etc/rc3.d/S70xymon # /etc/init.d/xymon start
|
여기까지 오셨으면 xymon 설치가 정상적으로 완료 되었습니다.
이제 브라우저를 통해서 접속이 가능합니다.
xymon 데몬이 html 파일을 주기적으로 자동 생성 되기 때문에 html 파일의 내용을 직접 수정할 수는 없습니다.
상단의 이름을 변경하고자 하실 때에는 cfg 파일을 수정 해야합니다.
9. xymon cfg 파일 변경 list
# vi /home/xymon/server/etc/xymonserver.cfg -> 상단의 이름 변경
# vi /home/xymon/server/etc/hosts.cfg -> 클라이언트 등록 |
10. Client Files DownLoad
:: Windows BBWin_0.13.msi
:: Linux (xymon 설치 파일에 클라이언트가 있습니다.)
# wget http://iweb.dl.sourceforge.net/project/xymon/Xymon/4.3.10/xymon-4.3.10.tar.gz
|