ŽQlhttp://thinkit.co.jp/story/2011/07/28/2204
¡Munin‚̃Cƒ“ƒXƒg[ƒ‹
‚»‚ê‚ł͎ÀÛ‚ÉMunin‚ð“ü‚ê‚Ă݂܂µ‚傤B
¦¡‰ñ‚à•Ö‹XãCentOS‚ð‘O’ñ‚Æ‚µ‚Ü‚·B‚È‚¨¡‰ñŠÄŽ‹ƒT[ƒo[‚ÆŠÄŽ‹‘ÎÛƒT[ƒo[‚ªˆÈ‰º‚̂悤‚È\¬‚Å‚ ‚邯‰¼’肵‚Ü‚·B
monsvr 10.0.0.1 # ŠÄŽ‹ƒT[ƒo[
host1 10.0.0.11 # ŠÄŽ‹‘ÎÛƒT[ƒo[
ʼn‚ÉAŠÄŽ‹ƒT[ƒo[‚ÆŠÄŽ‹‘ÎÛƒT[ƒo[‚É‚»‚ꂼ‚ê•K—v‚ȃpƒbƒP[ƒW‚ðƒCƒ“ƒXƒg[ƒ‹‚µ‚Ü‚·Byum‚ÅMunin‚ðƒCƒ“ƒXƒg[ƒ‹‚µ‚悤‚Æ‚·‚éê‡A•W€‚ÌƒŠƒ|ƒWƒgƒŠ‚ɂ͎c”O‚È‚ª‚çMunin‚ª‘¶Ý‚µ‚Ü‚¹‚ñ‚Ì‚ÅA‘¼‚ÌƒŠƒ|ƒWƒgƒŠ‚ðŽw’肵‚Ä‚©‚çyum‚ŃCƒ“ƒXƒg[ƒ‹‚·‚邱‚ƂɂȂè‚Ü‚·B
# rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm
# cat > /etc/yum.repos.d/dag.repo
[dag]
name=Dag RPM Repository for Red Hat Enterprise Linux
baseurl=http://ftp.riken.jp/Linux/dag/redhat/el4/en/x86_64/dag/ <- 32bit OS‚ÌꇂÍx86_64‚Ì‘ã‚í‚è‚Éi386
gpgcheck=1
gpgkey=http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt
enabled=1
œŠÄŽ‹ƒT[ƒo[‚Ìê‡
# yum -y --enablerepo=dag install munin-node
# yum -y --enablerepo=dag install munin
# yum -y install httpd
œŠÄŽ‹‘ÎÛƒT[ƒo[‚Ìê‡
# yum -y --enablerepo=dag install munin-node
# sed -i 's/enabled=1/enabled=0/' /etc/yum.repos.d/dag.repo
¡Munin‚ÌÝ’è
‚Ü‚¸‚ÍŠÄŽ‹ƒT[ƒo[‚ÌÝ’è‚ðs‚¢‚Ü‚·B
ˆÈ‰º‚Ì—v—Ì‚ÅÝ’èƒtƒ@ƒCƒ‹‚ð•ÒW‚µ‚Ü‚·BŠÄŽ‹ƒT[ƒo[‚Å‚ÍÝ’èƒtƒ@ƒCƒ‹‚Ì’†‚©‚çƒzƒXƒg–¼‚¾‚¯•ÏX‚µ‚Ü‚·B
(munin.conf‚Ì60s–ÚFƒzƒXƒg–¼‚Ì•ÏX)
# sed -i 's/localhost/monsvr/' /etc/munin/munin.conf
(munin-node.conf‚Ì29s–ÚFƒzƒXƒg–¼Žw’è)
# sed -i 's/#host_name x86-19.phx2.fedoraproject.org/host_name monsvr/' /etc/munin/
munin-node.conf
‚»‚µ‚ÄMunin-node‚Æapache‚ð‹N“®‚µ‚Ü‚·B
# service munin-node start
# service httpd start
¦Munin‚ÍTCP:4949ƒ|[ƒgAapache‚ÍTCP:80ƒ|[ƒg‚ő҂¿Žó‚¯‚邿‚¤‚ɂȂè‚Ü‚·
ÅŒã‚ÉÄ‹N“®Œã‚àmunin-node‚ªŽ©“®“I‚Éオ‚邿‚¤‚Éݒ肵‚Ä‚¨‚«‚Ü‚·B
# chkconfig munin-node on
¡ŠÄŽ‹‘ÎÛƒT[ƒo[‚ÌÝ’è
‘±‚¢‚ÄŠÄŽ‹‘ÎÛƒT[ƒo[‚ÌÝ’è‚ðs‚¢‚Ü‚·B
ˆÈ‰º‚Ì—v—Ì‚Åmunin-node‚ÌÝ’èƒtƒ@ƒCƒ‹‚ð•ÒW‚µ‚Ü‚·BŠÄŽ‹‘ÎÛƒT[ƒo[‚Å‚ÍÝ’èƒtƒ@ƒCƒ‹‚Ì’†‚©‚çƒzƒXƒg–¼‚ÆŠÄŽ‹ƒT[ƒo[‚ÌIPƒAƒhƒŒƒX‚ð•ÏX‚µ‚Ü‚·B
(munin-node.conf‚Ì29s–ÚFƒzƒXƒg–¼Žw’è)
# sed -i 's/#host_name x86-19.phx2.fedoraproject.org/host_name host1/' /etc/munin/
munin-node.conf
(munin-node.conf‚Ì36s–ÚFŠÄŽ‹ƒT[ƒo[‚©‚ç‚̃AƒNƒZƒX‹–‰Â)
# sed -i 's/127\\.0\\.0\\.1\$/10\\.0\\.0\\.1\$/' /etc/munin/munin-node.conf
‚»‚µ‚Ämunin-nodeƒf[ƒ‚ƒ“‚ð‹N“®‚µ‚Ü‚·B
# service munin-node start
ÅŒã‚ÉÄ‹N“®Œã‚àmunin-node‚ªŽ©“®“I‚Éオ‚邿‚¤‚Éݒ肵‚Ä‚¨‚«‚Ü‚·B
# chkconfig munin-node on
”•ª‚Ù‚Ç‚µ‚½‚çŠÄŽ‹î•ñ‚ªŠÄŽ‹ƒT[ƒo[‘¤‚ÉW‚Ü‚Á‚Ä‚‚é‚Ì‚ÅA“K“–‚ÈWEBƒuƒ‰ƒEƒU‚ʼnº‹LURL‚ðŠJ‚«‚Ü‚·B
http://monsvr/munin/
ƒfƒtƒHƒ‹ƒg‚Í5•ª‚ÌŠÔŠu‚ÅŽÀs‚³‚ê‚Ü‚·B‚±‚ê‚ð•Ï‚¦‚½‚¢ê‡‚Í/etc/cron.d/munin‚ð•ÒW‚µ‚Ü‚·B
vi /etc/cron.d/munin
*/5 * * * * munin test -x /usr/bin/munin-cron && /usr/bin/munin-cron <- */5‚Ì
•”•ª‚ð•ÏX‚·‚é
¡ŠÄŽ‹€–ڂ̒ljÁ휂ðs‚¤
Munin‚Å‚ÍA•W€‚Å—pˆÓ‚³‚ê‚Ä‚¢‚éŠÄŽ‹€–Ú‚ªŠÄŽ‹‘ÎÛƒT[ƒo[‚Ìu/usr/share/munin/plugins/v”z‰º‚É‘½”‘¶Ý‚µ‚Ä‚¢‚Ü‚·BŠÄŽ‹‘ÎÛ‚Æ‚µ‚ĒljÁ‚µ‚½‚¢‚à‚Ì‚ª‚ ‚ê‚ÎA‚»‚Ì’†‚©‚çŠÄŽ‹‚µ‚½‚¢€–Ú‚ð‘I‚ñ‚Åu/etc/munin/plugins/v”z‰º‚ɃVƒ“ƒ{ƒŠƒbƒNƒŠƒ“ƒN‚𒣂Á‚Ä‚©‚çmunin-node‚ðÄ‹N“®‚µ‚Ü‚·B‚±‚¤‚·‚邱‚ƂŊĎ‹‘ÎÛ‚ð’ljÁ‚·‚邱‚Æ‚ª‚Å‚«‚Ü‚·B
¡Apache‚ðŠÄŽ‹‘ÎÛ‚É‚·‚é—á
# ln -s /usr/share/munin/plugins/apache_accesses /etc/munin/plugins/apache_accesses
# ln -s /usr/share/munin/plugins/apache_processes /etc/munin/plugins/apache_processes
# ln -s /usr/share/munin/plugins/apache_volume /etc/munin/plugins/apache_volume
‚½‚¾‚µ‚±‚̂܂܂¾‚ÆŠeƒm[ƒh‚ÌApache‚ª•K—v‚Èî•ñ(server-status)‚ð“f‚«o‚µ‚Ä‚‚ê‚È‚¢‚Ì‚ÅAApache‚É‚àÝ’è’ljÁ‚ðs‚¢‚Ü‚·B
# echo "" >> /etc/httpd/conf/httpd.conf echo "ExtendedStatus On" >> /etc/httpd/conf/
httpd.conf
# echo "" >> /etc/httpd/conf/httpd.conf
# echo "SetHandler server-status" >> /etc/httpd/conf/httpd.conf
# echo "order deny,allow" >> /etc/httpd/conf/httpd.conf
# echo "deny from all" >> /etc/httpd/conf/httpd.conf
# echo "allow from 127.0.0.1" >> /etc/httpd/conf/httpd.conf
# echo "" >> /etc/httpd/conf/httpd.conf
# sed -i 's/#LoadModule status_module modules\/mod_status.so/LoadModule status_module
modules\/mod_status.so/' /etc/httpd/conf/httpd.conf
# service httpd graceful
# service munin-node restart
¡MySQL‚ðŠÄŽ‹‘ÎÛ‚É‚·‚é—á
# ln -s /usr/share/munin/plugins/mysql_bytes /etc/munin/plugins/mysql_bytes
# ln -s /usr/share/munin/plugins/mysql_queries /etc/munin/plugins/mysql_queries
# ln -s /usr/share/munin/plugins/mysql_threads /etc/munin/plugins/mysql_threads
# service munin-node restart
‹t‚ÉŠÄŽ‹‘ÎÛ‚©‚çŠO‚µ‚½‚¢ê‡‚Íu/etc/munin/plugins/v”z‰º‚̃Vƒ“ƒ{ƒŠƒbƒNƒŠƒ“ƒN‚ð휂µ‚Ämunin-node‚ðÄ‹N“®‚µ‚Ü‚·B
¡sendmail‚Æntp‚ðŠÄŽ‹‘ÎÛ‚©‚çŠO‚·—á
# rm -f /etc/munin/plugins/sendmail*
# rm -f /etc/munin/plugins/ntp*
# service munin-node restart
|
Apache 2.0‚ÆTomcat 5.0‚̘AŒg
dnotify‚ð—˜—p‚·‚éê‡
SQL‚̃eƒNƒjƒbƒN‚ð‹L
Oracle‚̃eƒNƒjƒbƒN‚ð‹L
VARCHAR2‚ðNUMBER‚ɕϊ·‚·‚éÛAŒ…”‚Å“{‚ç‚ê‚邯‚«‚ÉŒ…”‚𖳎‹‚·‚éfunction
trac‚Ìݒ胃‚
inotify‚ð—˜—p‚·‚éê‡
ŠÄŽ‹ƒT[ƒo[‚ÌÝ’
SSLƒL[ì
ŠÄŽ‹ƒT[ƒo[‚ÌÝ’
|