= 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 ¾Æ·¡¿¡ Ãß°¡ÇÑ´Ù.