¥È¥Ã¥× °ìÍ÷ ¸¡º÷ ¥Ø¥ë¥× RSS ¥í¥°¥¤¥ó

Nagios¤ÎÊѹ¹ÅÀ

  • Äɲ䵤줿¹Ô¤Ï¤³¤Î¤è¤¦¤Ëɽ¼¨¤µ¤ì¤Þ¤¹¡£
  • ºï½ü¤µ¤ì¤¿¹Ô¤Ï¤³¤Î¤è¤¦¤Ëɽ¼¨¤µ¤ì¤Þ¤¹¡£
!!!´Æ»ë¥½¥Õ¥ÈNagios¤ò¥¤¥ó¥¹¥È¡¼¥ë¤¹¤ë¡£

!!º£²ó¤ÎÌÜɸ
1Âæ¤Ç³Æ¥Í¥Ã¥È¥ï¡¼¥¯¾å¤Î¥µ¡¼¥Ð¤ò´Æ»ë¤·¤¿¤¤¡£¤Ä¤Þ¤ê¡¤´Æ»ë¦PC¤Ë¤Ï¡¤2Ëç¤ÎLAN¥«¡¼¥É¤òÁõÃ夷¡¤³ÆIP¥¢¥É¥ì¥¹¤òÉÕÍ¿¡£
¤½¤·¤Æ¡¤2¤Ä¤Î¥Í¥Ã¥È¥ï¡¼¥¯¤È¥µ¡¼¥Ð¤Î»à³è³Îǧ¤ò¹Ô¤¦¡£

!!¼Â¸³ÆâÍÆ
3Âæ¤ÎPC¤òÍѰա£¡Ê¤¦¤Á¡¤1Âæ¤Ï¡¤Nagios¤ò¥¤¥ó¥¹¥È¡¼¥ë¡Ë
´Æ»ë¤µ¤ì¤ë2Âæ¤ÎPC¤Ï¡¤³Æ¡¹ÊÌIP¡¤Ê̥ͥåȥ¥¯¤È¤·¤Þ¤¹¡£
´Æ»ë¦PC¡ÊCentOS5¡¤Nagios¥¤¥ó¥¹¥È¡¼¥ë¡Ë

*Nagios¤È¤Ï
**¥Í¥Ã¥È¥ï¡¼¥¯¤ËÀܳ¤µ¤ì¤¿µ¡´ï¤òÄê´üŪ¤Ë¥Á¥§¥Ã¥¯¤·¡¤¾ã³²È¯À¸¤Ë·è¤á¤é¤ì¤¿¼êÃʤǴÉÍý¼Ô¤ËÄÌÃΤ·¤Þ¤¹¡Ê¥á¡¼¥ë¡Ë¡£
**²Ã¤¨¤Æ¡¤Web¤«¤é¾ã³²¤Î¾õ¶·¤ä´Æ»ëÂоݤξõÂÖÊѲ½¤¬³Îǧ¤Ç¤­¤Þ¤¹¡£

**ÆÃħ
**´Æ»ë»þ¹ï¤Î¥¹¥±¥¸¥å¡¼¥ê¥ó¥°¤¬²Äǽ¡Ê·è¤á¤é¤ì¤¿»þ´Ö¤·¤«´Æ»ë¤·¤Ê¤¤¡Ë
**´Æ»ë¹àÌܤˤϡ¤HTTP¡¤FTP¡¤POP3¡¤SMTPÅù¥Ç¥Õ¥©¥ë¥È¤ÇÍѰդµ¤ì¤Æ¤¤¤Þ¤¹¡£

**Nagios¥Û¡¼¥à¥Ú¡¼¥¸
**http://www.nagios.org/

!!¼Â¸³·ë²Ì
¡¡
*Îã¡§Ping¤Ë¤è¤ë»à³è³Îǧ
**¥Ç¥Õ¥©¥ë¥È»ÅÍ;塤5ʬ´Ö³Ö¤Ç´Æ»ë¡¤°ìÅÙ¡¤¾õ¶·¤¬ÊѲ½¤¹¤ë¤È¡¤1ʬ´Ö³Ö¤ÇÀßÄê¿ô¤ÎºÆ»î¹Ô¤ò¹Ô¤¦¡£¤½¤Î¤¢¤È¡¤²þÁ±¤µ¤ì¤Ê¤¤¤È´ÉÍý¼Ô°¸¤Ø¥á¡¼¥ë¡Ê¥Ç¥Õ¥©¥ë¥È¡Ë¡£
**Ping¤Ï¡¤RTA¤¬100ms°Ê¾å¡¤500ms̤Ëþ¡¤¤¢¤ë¤¤¤Ï¡¤20%°Ê¾å60%̤Ëþ¤Î¥Ñ¥±¥Ã¥È¥í¥¹¤ÇWarning¤òɽ¼¨¤·¡¤¤½¤ì°Ê¾å¤Î»þ¤Ï¡¤Critical¡ÊÀÖ¿§¡Ë¤ËÊѲ½¤¹¤ë¡£
**¤è¤Ã¤Æ¡¤Â¨±þÀ­¤Ï¡¤Ë³¤·¤¤¤È¤¤¤¨¤ë¡£
**(/usr/local/nagios/etc/localhost.cfg¤Î¤·¤­¤¤Ãͤò¸·³Ê¤Ë¤¹¤ì¤Ð¡¤¤â¤¦¾¯¤·Â¨±þÀ­¤¬¹â¤Þ¤ë¡Ë

**¥Ö¥é¥¦¥¶Â¦¤Ï¡¤90ÉÃËè¤Ë¥¢¥Ã¥×¥Ç¡¼¥È¤µ¤ì¤ë¡£
**¡Ê/usr/local/nagios/etc/cgi.cfg¤ÎÀßÄêÃͤòÊѤ¨¤ì¤Ð¡¢10ÉäǤâ²Äǽ¡Ë

**nagios.cfg¤Îexternal command check interval¤ÎÃͤò1s¤Ë¤¹¤ì¤Ð¡¤1Éôֳ֤ÇÀßÄê²Äǽ¤«¤â¡£
**¸½ºß¤Ç¤Ï¡¤£²Ê¬ÄøÅÙ¤ÎÃÙ¤ì¤Ç´Æ»ë¤µ¤ì¤ëPC¤Î»à³è³Îǧ¤¬¤Ç¤­¤Þ¤¹¡£
¡¡
¡¡
!!¥¤¥ó¥¹¥È¡¼¥ë»ñÎÁ¡ÊOS¤Ï¡¤CentOS5¤ò»ÈÍÑ¡£¡Ë
!(0)¥æ¡¼¥¶¤ª¤è¤Ó¥°¥ë¡¼¥×¤ÎºîÀ®
*Nagios¤Ï¡¤¥Ç¡¼¥â¥ó¤È¤·¤Æ²Ôư¤·¤Þ¤¹¡£¥æ¡¼¥¶¸¢¸Â¤Ç²Ôư¤µ¤»¤ë°Ù¡¤ÀìÍѤΥ桼¥¶¤È¥¤¥ó¥¹¥È¡¼¥ëÀè¥Ç¥£¥ì¥¯¥È¥ê¤òºîÀ®¤·¤Þ¤¹¡£
*Web¥µ¡¼¥Ð¤«¤éNagios¤ËÂФ·¤Æ¥³¥Þ¥ó¥É¤òȯ¹Ô¤·¤ÆNagios¤òÁàºî¤¹¤ë¤³¤È¤Ë¤Ê¤ë°Ù¡¤
*Web¥µ¡¼¥Ð¤Î¥æ¡¼¥¶¤òNagios¤Î¥³¥Þ¥ó¥É¤ò½èÍý¤¹¤ëÀìÍѤΥ°¥ë¡¼¥×¤Î¥á¥ó¥Ð¡¼¤ËÀßÄꤷ¤Þ¤¹¡£
*httpd¥æ¡¼¥¶¤ò¿·¤·¤¯ºîÀ®¤·¤¿nagcmd¥á¥ó¥Ð¡¼¤Ë²Ã¤¨¤Þ¤¹¡£

	# /usr/sbin/groupadd nagios
	# /usr/sbin/useradd -d /usr/local/nagios -g nagios -m nagios
	# /usr/sbin/groupadd nagcmd
	# /usr/sbin/usermod -G nagcmd httpd
	# /usr/sbin/usermod -G nagcmd nagios

!(1)gcc¤Î¥¤¥ó¥¹¥È¡¼¥ë¡Ê¸å¤ÇɬÍפȤʤë°Ù¡Ë
*# yum -y install gcc

!(2)Nagios¤Ï¡¤PNG¡¤JPEG¥é¥¤¥Ö¥é¥êÅùɬÍפʰ١¤³Æ¼ï¥¤¥ó¥¹¥È¡¼¥ë¡£

*PNG¥é¥¤¥Ö¥é¥ê¤Ï¡¢http://www.libpng.org/pub/png¤è¤ê¼èÆÀ¡Êlibpng-1.2.20.tar.gz¡Ë¡£

	$ ./configure --prefix=/usr/local
	$ cd 
	$ make
	$ su
	# make install

*JPEG¥é¥¤¥Ö¥é¥ê¤Ï¡¢http://www.ijg.org¤è¤ê¼èÆÀ¡Êjpegsrc.v6b.tar.gz¡Ë¡£

	$ tar zvxf jpegsrc.v6b.tar.gz
	$ cd 
	$ ./configure --pregix=/usr/local --enable-shared --enable-static
	$ make 
	$ su
	# make install

*¥¨¥é¡¼¤¬¤Ç¤¿¤Î¤Ç¡¤/usr/local/man/man1/cjpec.1¤òºîÀ®¤·¤¿¡£

!(3)GD¥é¥¤¥Ö¥é¥ê¤Î¥¤¥ó¥¹¥È¡¼¥ë¡£

*GD¥é¥¤¥Ö¥é¥ê¤Ï¡¢²èÁü¤òÁàºî¤¹¤ë¤¿¤á¤Î¥é¥¤¥Ö¥é¥ê·²¡£
*°ìÈ̤ˡ¢GD¥é¥¤¥Ö¥é¥êËÜÂΤȡ¢perl¥â¥¸¥å¡¼¥ë¤È¤·¤Æ¤ÎGD.pm¤ò¤Ò¤È¤Þ¤È¤á¤Ë¤·¤Æ¸À¤¦¤³¤È¤¬Â¿¤¤¡£
*¤³¤³¤ÇɬÍפÊGD¥é¥¤¥Ö¥é¥ê¤Ï¡¢1.6.3°Ê¾å¤Ç¤¹¡£
*http://www.boutell.com/¤À¤Ã¤¿¤¬¡¤http://www.libgd.org/Main_Page¤ËÊѹ¹¡£

*wget¤Ç¥Õ¥¡¥¤¥ë¤ò¥À¥¦¥ó¥í¡¼¥É

*wget http://www.boutell.com/gd/http/gd-2.0.32.tar.gz¤«¤éwget http://www.libgd.org/releases/gd-2.0.35.tar.gz¤ØÊѹ¹¡£
	$ wget http://www.libgd.org/releases/gd-2.0.35.tar.gz

*¥Õ¥¡¥¤¥ë¤òŸ³«¤·¤Þ¤¹¡£
	$ tar xvfz gd-2.0.32.tar.gz

*Ÿ³«¤·¤¿¥Ç¥£¥ì¥¯¥È¥ê¤ËÆþ¤ê¤Þ¤¹¡£
	$ cd gd-2.0.32

*make ¤Î½àÈ÷¤ò¤·¤Þ¤¹¡£
	$ ./configure --with-png=/usr/local/lib --with-jpeg=/usr/local/bin --prefix=/usr/local
	$ make
	$ make test
	$ su
	# make install

!(4)Nagios¤ò¥¤¥ó¥¹¥È¡¼¥ë
*Nagios¤¬rpm¥¤¥ó¥¹¥È¡¼¥ë¤µ¤ì¤Æ¤¤¤Ê¤¤¤«¤É¤¦¤«³Îǧ
	# rpm qa|grep nagios
*¡ÊNagios¤«¤é¤Îwget¤Ï¡¤¾Êά¡Ë
	$ tar xvzf nagios-2.9.tar.gz¤ÇŸ³«
	$ cd nagios-2.9
	$ ./configure --prefix=/usr/local/nagios --with-command-group=nagcmd --with-gd-lib=/usr/local/lib
	$ make all
	# make install
	# make install-init
	# make install-commandmode
	# make install-config

!(5)Nagios Plugin Development¤Î¥¤¥ó¥¹¥È¡¼¥ë
*¥À¥¦¥ó¥í¡¼¥É¤·¤¿¥Õ¥¡¥¤¥ë¤Ï¡¤nagios-plugins-1.4.9.tar.gz¤Ç¤·¤¿¡£
	$ ./configure --prefix=/usr/local/nagios --with-cgiurl=/usr/local/nagios/cgi-bin
	$ make
	# make install

!(6)Nagios¤ÎWeb¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¤Î¤¿¤á¤ÎÀßÄê¤ò¹Ô¤¦¡£
*http.conf(/etc/httpd/conf/http.conf)¤Ë²¼µ­¤ÎÆâÍÆ¤òÄɵ­¡ÊCGI¤¬Æ°ºî¤¹¤ë¤è¤¦¤ËÀßÄê¤ò¹Ô¤¦¡Ë¡£

	ScriptAlias /nagios/cgi-bin/ /usr/local/nagios/sbin/
	<Directory "/usr/local/nagios/sbin/">
	AllowOverride AuthConfig
	Options ExecCGI
	Order allow,denyvi /
	Allow from all
	</Directory>
	
	Alias /nagios/ /usr/local/nagios/share/
	<Directory "/usr/local/nagios/share/">
	AllowOverride AuthConfig
	Options None
	Order allow,deny
	Allow from all
	</Directory>

!(7)´ÉÍý²èÌÌÍѥ桼¥¶¤ª¤è¤Ó¥Ñ¥¹¥ï¡¼¥É¤ÎºîÀ®
*Web¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¤ËBASICǧ¾Ú¤ò»È¤¤¤Þ¤¹¡£
*/usr/local/nagios/share/¤È/usr/local/nagios/sbin/¥Ç¥£¥ì¥¯¥È¥ê¤Ë.htaccess¤òºîÀ®¤¹¤ë¡£
*.htaccess¤ÎÀßÄê¡Êchmod 604¤ÇÀßÄê¡Ë
	AuthName "Nagios Access"
	AuthType Basic
	AuthUserFile /usr/local/nagios/etc/htpasswd.users
	require valid-user

*.htaccess¤Î¡ÖAuthUserFile¡×¤Ç»ØÄꤷ¤¿¡Ö/usr/local/nagios/etc/htpasswd.users¡×¤Ëhtpasswd¥³¥Þ¥ó¥É¤òÍøÍѤ·¤Æ¥æ¡¼¥¶¤òÄɲä·¤Þ¤¹¡£
*º£²ó¤Ï¡¢¡Önagios¡×¤È¤¤¤¦¥æ¡¼¥¶¤òÄɲä·¤Þ¤¹¡£
*¡Êhttp://www.shtml.jp/htaccess/basic.html¤ÇÀâÌÀ¤¬¤¢¤ê¤Þ¤¹¤Î¤Ç¡¢¤½¤Á¤é¤ò¸«¤¿¤Û¤¦¤¬Áᤤ¡Ë

*htpasswd¤ÇWeb¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹ÍÑ¥¢¥«¥¦¥ó¥ÈÅÐÏ¿
	# su nagios
	$ htpasswd -c /usr/local/nagios/etc/htpasswd.users nagios
	New password:
	Re-type new password:
	Adding password for user nagios

!(8)Nagios´ðËÜÆ°ºîÀßÄê
*ÀßÄꤹ¤ë¥Õ¥¡¥¤¥ë·²
**¥á¥¤¥óÀßÄê¥Õ¥¡¥¤¥ë¡§nagios.cfg
**CGIÀßÄê¥Õ¥¡¥¤¥ë¡§cgi.cfg
**¥ê¥½¡¼¥¹ÀßÄê¥Õ¥¡¥¤¥ë¡§resource.cfg
**´Æ»ëÀßÄê¥Õ¥¡¥¤¥ë¡§localhost.cfg

*¥¤¥ó¥¹¥È¡¼¥ë¤µ¤ì¤¿¥µ¥ó¥×¥ëÀßÄê¤ò¥³¥Ô¡¼¤·¤Æ»ÈÍѤ·¤Þ¤¹¡£
	# su nagios
	$ cd /usr/local/nagios/etc
	$ cd nagios.cfg-sample nagios.cfg
	$ cd cgi.cfg-sample cgi.cfg
	$ cd resource.cfg-sample resource.cfg

*¸å¡¤localhost.cfg¤Ècommands.cfg¤ò¥³¥Ô¡¼

*nagios.cfg¤Î½¤Àµ²Õ½ê
	37	#cfg_file=/usr/local/nagios/etc/checkcommands.cfg¡¡¢«¤³¤ì¤Ï¤Ê¤«¤Ã¤¿¡£
	40	#cfg_file=/usr/local/nagios/etc/misccommands.cfg¡¡¢«¤³¤ì¤Ï¤Ê¤«¤Ã¤¿¡£
	131	check_external_commands=1

*cgi.cfg¤Î½¤Àµ²Õ½ê
	116	authorized_for_system_information=nagios
	128	authorized_for_configuretion_information=nagios
	141	authorized_for_system_commands=nagios
	154	authorized_for_all_services=nagios
	155	authorized_for_all_hosts=nagios
	168	authorized_for_all_service_commands=nagios
	169	authorized_for_all_host_commands=nagios

*Nagios¥Ç¡¼¥â¥ó¤Î¾õÂÖ¤òWeb¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¤«¤éÇİ®¤¹¤ëÀßÄê¡Êcgi.cfg¡Ë
	65	nagios_check_command=/usr/local/nagios/libexec/check_nagios /usr/local/nagios/var/status.dat 5 '/usr/local/nagios/bin/nagios'

*¥ê¥½¡¼¥¹ÀßÄê¥Õ¥¡¥¤¥ë¡Êresource.cfg¡Ë
	ÆÃ¤Ë̵¤·

*ÀßÄê¤ÎÀ°¹çÀ­¥Á¥§¥Ã¥¯¤ÈNagios¤Îµ¯Æ°
	ÀßÄê¥Õ¥¡¥¤¥ë¤Î¥Á¥§¥Ã¥¯¤Ï¡¢nagios¥³¥Þ¥ó¥É¤Ë-v¤Î°ú¿ô¤ò¤Ä¤±¤Ænagios.cfg¤ò»ØÄꤷ¤Þ¤¹¡£
	
	# /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
	
*¾åµ­¥³¥Þ¥ó¥É¤ò¹Ô¤¦¤È¡¤²¼¤Îɽ¼¨¤¬¤µ¤ì¤ì¤Ð¡¤OK¡£¥¨¥é¡¼¤¬½Ð¤¿¾ì¹ç¤Ë¤Ï¡¤ÀßÄêÆâÍÆ¤ò¥Á¥§¥Ã¥¯¤¹¤ë¤³¤È¡£
	
	Total Warnings: 0
	Total Errors: 0
		
	Things look okay -No serious problems were detected during the pre-flight check

*¸å¡¤³Æ*.cfg¤Î°À­¡Ê664¡Ë¤ËÀßÄꤷ¤Æ¤ª¤¯¤³¤È¡£

!(9)Nagios¤Îµ¯Æ°
	$ su -
	# /etc/init.d/nagios start
	¡¡
!(10)Nagios¤ò¼«Æ°µ¯Æ°¤Ë¤¹¤ë
	# cd /etc/init.d/
	# chmod 755 nagios
	# /sbin/chkconfig --add nagios
	# /sbin/chkconfig --list nagios
	# /sbin/chkconfig --level 35 nagios on
	# /sbin/chkconfig --list nagios
	
!(11)´Æ»ëÂоÝPC¤òÄɲ乤롣
*/usr/local/nagios/etc/localhost.cfg¤Ë´Æ»ëÂоݥۥ¹¥È¤òÄɲ乤ë¡Ê°Ê²¼Ä¹¤¤¤Ç¤¹¤¬¡¤¤´´ªÊÛ¤ò¡Ë¡£
	
	
	###############################################################################
	# LOCALHOST.CFG - SAMPLE OBJECT CONFIG FILE FOR MONITORING THIS MACHINE
	#
	# Last Modified: 11-27-2006
	#
	# NOTE: This config file is intended to servce as an *extremely* simple 
	#       example of how you can create your object configuration file(s).
	#
	###############################################################################
	
	
	
	###############################################################################
	###############################################################################
	#
	#TIME PERIODS
	#
	###############################################################################
	###############################################################################
	
	# This defines a timeperiod where all times are valid for checks, 
	# notifications, etc.  The classic "24x7" support nightmare. :-)
	
	define timeperiod{
 		timeperiod_name 24x7
   		alias           24 Hours A Day, 7 Days A Week
  		sunday          00:00-24:00
   		monday          00:00-24:00
    		tuesday         00:00-24:00
     		wednesday       00:00-24:00
   		thursday        00:00-24:00
        	friday          00:00-24:00
        	saturday        00:00-24:00
        	}
	
	
	# 'workhours' timeperiod definition
	define timeperiod{
		timeperiod_name	workhours
		alias		"Normal" Working Hours
		monday		09:00-17:00
		tuesday		09:00-17:00
		wednesday	09:00-17:00
		thursday	09:00-17:00
		friday		09:00-17:00
		}
	
	
	# 'nonworkhours' timeperiod definition
	define timeperiod{
		timeperiod_name	nonworkhours
		alias		Non-Work Hours
		sunday		00:00-24:00
		monday		00:00-09:00,17:00-24:00
		tuesday		00:00-09:00,17:00-24:00
		wednesday	00:00-09:00,17:00-24:00
		thursday	00:00-09:00,17:00-24:00
		friday		00:00-09:00,17:00-24:00
		saturday	00:00-24:00
		}
	
	
	# 'none' timeperiod definition
	define timeperiod{
		timeperiod_name	none
		alias		No Time Is A Good Time
		}
		
	
		
	###############################################################################
	###############################################################################
	#
	# COMMANDS
	#
	###############################################################################
	###############################################################################
	
	# NOTE: Sample command definitions can now be found in the sample commands.cfg 
	#       file
		
	
		
		
	###############################################################################
	###############################################################################
	#
	# CONTACTS
	#
	###############################################################################
	###############################################################################
	
	# In this simple config file, a single contact will receive all alerts.
	# This assumes that you have an account (or email alias) called
	# "nagios-admin" on the local host.
	
	define contact{
        	contact_name                    nagios-admin
     		alias                           Nagios Admin
        	service_notification_period     24x7
        	host_notification_period        24x7
        	service_notification_options    w,u,c,r
        	host_notification_options       d,r
        	service_notification_commands   notify-by-email
        	host_notification_commands      host-notify-by-email
        	email                           nagios-admin@localhost
        	}
		
		
		
	###############################################################################
	###############################################################################
	#
	# CONTACT GROUPS
	#
	###############################################################################
	###############################################################################
		
	# We only have one contact in this simple configuration file, so there is
	# no need to create more than one contact group.
		
	define contactgroup{
        	contactgroup_name       admins
        	alias                   Nagios Administrators
        	members                 nagios-admin
        	}
		
		
		
	###############################################################################
	###############################################################################
	#
	# HOSTS
	#
	###############################################################################
	###############################################################################
	
	# Generic host definition template - This is NOT a real host, just a template!
	
	define host{
        	name                            generic-host    ; The name of this host template
        	notifications_enabled           1       	; Host notifications are enabled
        	event_handler_enabled           1       	; Host event handler is enabled
        	flap_detection_enabled          1       	; Flap detection is enabled
        	failure_prediction_enabled      1       	; Failure prediction is enabled
        	process_perf_data               1       	; Process performance data
        	retain_status_information       1       	; Retain status information across program restarts
        	retain_nonstatus_information    1       	; Retain non-status information across program restarts
		notification_period		24x7		; Send host notifications at any time
        	register                        0       	; DONT REGISTER THIS DEFINITION - ITS NOT A REAL HOST, JUST A TEMPLATE!
        	}
	
	
	# Linux host definition template - This is NOT a real host, just a template!
	
	define host{
		name				linux-server	; The name of this host template
		use				generic-host	; This template inherits other values from the generic-host template
		check_period			24x7		; By default, Linux hosts are checked round the clock
		max_check_attempts		10		; Check each Linux host 10 times (max)
        	check_command           	check-host-alive ; Default command to check Linux hosts
		notification_period		workhours	; Linux admins hate to be woken up, so we only notify during the day
								; Note that the notification_period variable is being overridden from
								; the value that is inherited from the generic-host template!
		notification_interval		120		; Resend notification every 2 hours
		notification_options		d,u,r		; Only send notifications for specific host states
		contact_groups			admins		; Notifications get sent to the admins by default
		register			0		; DONT REGISTER THIS DEFINITION - ITS NOT A REAL HOST, JUST A TEMPLATE!
		}
	
	
	# Since this is a simple configuration file, we only monitor one host - the
	# local host (this machine).
	
	define host{
        	use                     linux-server            ; Name of host template to use
								; This host definition will inherit all variables that are defined
								; in (or inherited by) the linux-server host template definition.
        	host_name               localhost
        	alias                   localhost
        	address                 127.0.0.1
        	}
	
	#
	#¡¡2007.9.20¡¡Äɲä·¤Þ¤·¤¿¡£
	#¡¡¤³¤³¤Ç¡¢´Æ»ëÂоݥۥ¹¥È¤Î̾Á°¡¢IP¥¢¥É¥ì¥¹Åù¤òÄêµÁ¤·¤Þ¤¹¡£
	#
	
	define host{
		use			linux-server
		host_name		server01
		alias			server01
		address			***.***.***.***
		}
	
	define host{
		use			linux-server
		host_name 		server02
		alias			server02
		address			***.***.***.***
		}
	
	#
	
	###############################################################################
	###############################################################################
	#
	# HOST GROUPS
	#
	###############################################################################
	###############################################################################
	
	# We only have one host in our simple config file, so there is no need to
	# create more than one hostgroup.
	
	#
	#¤³¤Á¤é¤Ç¤Ï¡¤´Æ»ëÂоݥۥ¹¥È¤Î¥°¥ë¡¼¥×¤òÀßÄꤷ¤Þ¤¹¡£
	#members¤Ï¡¤¾åµ­¤ÇÀßÄꤷ¤¿host_name¡¤alias̾¤ÇÅÐÏ¿¤·¤Þ¤¹¡£
	#
	
	define hostgroup{
  	      hostgroup_name  test
        	alias           Test Servers
        	members         localhost,server01,server02
        	}
	
	
	
	###############################################################################
	###############################################################################
	#
	# SERVICES
	#
	###############################################################################
	###############################################################################
	
	# Generic service definition template - This is NOT a real service, just a template!
	
	define service{
        	name                            generic-service 	; The 'name' of this service template
        	active_checks_enabled           1       		; Active service checks are enabled
        	passive_checks_enabled          1    		   	; Passive service checks are enabled/accepted
		parallelize_check               1       		; Active service checks should be parallelized 
									(disabling this can lead to major performance problems)
        	obsess_over_service             1       		; We should obsess over this service (if necessary)
        	check_freshness                 0       		; Default is to NOT check service 'freshness'
        	notifications_enabled           1       		; Service notifications are enabled
        	event_handler_enabled           1       		; Service event handler is enabled
        	flap_detection_enabled          1       		; Flap detection is enabled
        	failure_prediction_enabled      1       		; Failure prediction is enabled
        	process_perf_data               1       		; Process performance data
        	retain_status_information       1       		; Retain status information across program restarts
        	retain_nonstatus_information    1       		; Retain non-status information across program restarts
        	is_volatile                     0       		; The service is not volatile
        	register                        0       		; DONT REGISTER THIS DEFINITION - ITS NOT A REAL SERVICE, JUST A TEMPLATE!
        	}
	
	
	# Local service definition template - This is NOT a real service, just a template!
	
	define service{
		name				local-service 		; The name of this service template
		use				generic-service		; Inherit default values from the generic-service definition
        	check_period                    24x7			; The service can be checked at any time of the day
        	max_check_attempts              4			; Re-check the service up to 4 times in order to determine its final (hard) state
        	normal_check_interval           5			; Check the service every 5 minutes under normal conditions
		#
		#¡¡¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï¡¤5ʬ¤Ç¤¹¤¬¡¤º£²ó¤Ï¡¤1ʬ¤ËÊѹ¹¤·¤Æ¤¤¤Þ¤¹¡Ê¾åµ­¤Ï¡¤5ʬ¤Î¤Þ¤Þ¤Ç¤¹¡£¡Ë
		#
        	retry_check_interval            1			; Re-check the service every minute until a hard state can be determined
        	contact_groups                  admins			; Notifications get sent out to everyone in the 'admins' group
		notification_options		w,u,c,r			; Send notifications about warning, unknown, critical, and recovery events
        	notification_interval           60			; Re-notify about service problems every hour
        	notification_period             24x7			; Notifications can be sent out at any time
        	register                        0       		; DONT REGISTER THIS DEFINITION - ITS NOT A REAL SERVICE, JUST A TEMPLATE!
		}
	
	
	#
	#
	#°Ê²¼¤è¤ê¡¤³Æ´Æ»ë¥µ¡¼¥Ó¥¹¤ÎÀßÄê¤Ë¡¤¾åµ­¤ÇÄêµÁ¤·¤¿´Æ»ëÂоݥۥ¹¥È¡Êhost_name¡¤alias̾¡Ë¤òÄɲ䷤Ƥ¤¤­¤Þ¤¹¡£
	#
	#
	
	
	 Define a service to "ping" the local machine
	
	define service{
        	use                             local-service         ; Name of service template to use
        	host_name                       localhost,server01,server02
		#
		#¤³¤³¤Ç¡¤´Æ»ëÂоݥۥ¹¥È¤òÅÐÏ¿¤·¤Æ¤¤¤Þ¤¹¡£
        	#	
		service_description             PING
		check_command			check_ping!100.0,20%!500.0,60%
        	#
		#ping¥³¥Þ¥ó¥É¤ÎïçÃͤòÀßÄꤷ¤Æ¤¤¤Þ¤¹¡£
		#
		}
		
	# Define a service to check the disk space of the root partition
	# on the local machine.  Warning if < 20% free, critical if
	# < 10% free space on partition.
	
	define service{
        	use                             local-service         ; Name of service template to use
        	host_name                       localhost,server01,server02
        	service_description             Root Partition
		check_command			check_local_disk!20%!10%!/
        	}
	
	
	
	# Define a service to check the number of currently logged in
	# users on the local machine.  Warning if > 20 users, critical
	# if > 50 users.
	
	define service{
        	use                             local-service         ; Name of service template to use
        	host_name                       localhost,server01,server02
        	service_description             Current Users
		check_command			check_local_users!20!50
        	}
	
		
	# Define a service to check the number of currently running procs
	# on the local machine.  Warning if > 250 processes, critical if
	# > 400 users.
	
	define service{
	        use                             local-service         ; Name of service template to use
	        host_name                       localhost,server01,server02
	        service_description             Total Processes
		check_command			check_local_procs!250!400!RSZDT
	        }
	
	
	
	# Define a service to check the load on the local machine. 
	
	define service{
	        use                             local-service         ; Name of service template to use
	        host_name                       localhost,server01,server02
	        service_description             Current Load
		check_command			check_local_load!5.0,4.0,3.0!10.0,6.0,4.0
	        }
	
	°Ê¾å¤Ç¤¹¡£2007.9.21.


!!!¤½¤Î¾¤Î´Æ»ë¥½¥Õ¥È
!ping¤Ë¤è¤ëIP»à³è³Îǧ¤Ç¤¢¤ì¤Ð¡¤ExPing¤È¤¤¤¦¥½¥Õ¥È¤¬´Êñ¤Ç¤¹¡£
*´Æ»ë´Ö³Ö¤Ï¡¤1ʬñ°Ì

http://www.woodybells.com/exping.html

by Í­¸Â²ñ¼Ò¥±¥¤¥¢¥¤¥¨¥à¡Êhttp://www.keiaiemu.com/)