= System Monitoring With Nagios HowTo = [[TableOfContents]] == Nagios System Software Environment == * nagios * nagios-plugin * nagiosweb * apache * php * mysql, php-mysql * net-snmp, net-snmp-utils, net-snmp-libs * net-snmp-perl, perl-Net-SNMP * perl * perl-usd-snmp * freedts == Contact Info == nagios 설치 매뉴얼로 만든 것인데 올려봅니다. 틀린점있으시면 메일 주세요 :) 심승준 ( ftfuture at hitel.net) == INSTALL == === OS Setting.. === * fedora core5 linux 설치 * gcc, g++ 설치 * apache, php, mysql 설치 * net-snmp, net-snmp-utils, net-snmp-libs 설치 * net-snmp-perl, perl-Net-SNMP(yum upgrade 이후 설치가능) 설치 * perl 설치 * perl-ucd-snmp 설치 * gd 설치 * php-mysql 설치 ' * 팁 : yum install '패키지이름' 으로 설치한다. ' * 설치후 yum upgrade 로 시스템을 업데이트 한다. === nagios install === * nagios.org 에서 nagios를 다운로드 받는다. (wget http://jaist.dl.sourceforge.net/sourceforge/nagios/nagios-2.3.1.tar.gz) * 압축을 푼후 nagios 디렉토리로 이동 * shell에서 ./configure --with-nagios-group=apache 실행 * 한글 패치 - Conatact name, Service Name등에 한글쓰면 에러가 나는데.. 이것을 패치한다. base/util.c 를 연다. int contains_illegal_object_chars(char *name){ ... register unsigned int ch; (unsigned 를 추가한다.) * make all * make install * make install-config * make install-init * make install-commandmode * "nagios root directory"/etc/sample-config/httpd.conf 파일을 "apache cfg directory"/conf.d/nagios.conf 로 symbolic link 설정 (sample-config가 없을경우 소스 디렉토리에서 복사한다.) * htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin (새로생성, 추가시에는 -C옵션을 뺀다.) * 주의 : iptables가 설정되어있으면 끈다. * 주의 : selinux 주의 === nagios-plugin install === * nagios.org 에서 nagios-plugin을 다운로드 받는다. (wget http://jaist.dl.sourceforge.net/sourceforge/nagiosplug/nagios-plugins-1.4.3.tar.gz) * nagios-plugins 디렉토리로 이동한다. * ./configure --with-nagios-group=apache 실행 * make 실행 * make install 실행 * 루트 계정에서 make install-root 실행 === external nagios-plugin install === * www : http://www.nagiosexchange.org/SNMP.51.0.html * check_snmp_load.pl (http://www.nagiosexchange.org/SNMP.51.0.html?&tx_netnagext_pi1[p_view]=51&tx_netnagext_pi1[page]=30%3A10) * check_snmp_mem.pl (http://www.nagiosexchange.org/SNMP.51.0.html?&tx_netnagext_pi1[p_view]=52&tx_netnagext_pi1[page]=40%3A10) * check_snmp_storage.pl (http://www.manubulon.com/nagios/) === nagiosweb install === * www : http://sourceforge.net/projects/nagiosweb/ * nagiosweb2-1.3.tar.gz을 다운받는다. (wget http://jaist.dl.sourceforge.net/sourceforge/nagiosweb/nagiosweb2-1.3.tar.gz) * nagiosweb 폴더로 이동 * 웹폴더인 nagiosweb 폴더를 웹루트로 복사(예 : /var/www/html) * mysql에 nagiosweb 데이터베이스 생성(예: mysqladmin -u root -p create nagiosweb) * mysql에 nagios 사용자 생성, nagioweb DB에 대한 권한 부여 #> mysql -u root -p grant all on nagiosweb.* to nagios@localhost identified by 'password'; flush privileges; * nagiosweb.sql의 내용을 nagiosweb DB에 입력(예: mysql -u nagios -p nagiosweb < nagiosweb.sql) * dbconfig.php 수정.. 웹폴더에 있음(예: /var/www/html/nagiosweb/dbconfig.php) $db = mysql_connect("localhost", "사용자명", "패스워드 "); <----- 사용자명과 패스워드 수정 * nagios 기본폴더(예: /usr/local/nagios/share/side.html) share/side.html 수정.. README 파일 참조 {{{ Configuration table 아래에 추가한다.