![]() |
|
munin + mod_watch 監控多台主機的 Virtual Host 網站流量 (未完)
作者: cross 日期: 2008-07-24 09:34
1。登入主機
2。yum -y install httpd-devel
3。下載 wget http://updates.interworx.info/iworx/legacy/sources/mod_watch403.tgz
4。解開 tar zxvf mod_watch403.tgz ; cd mod_watch-4.3
5。編輯 Makefile.dso,更改 APXS=/usr/sbin/apxs
6。編譯 make -f Makefile.dso install
7。編輯 vi /etc/httpd/conf.d/mod_watch.conf,內容如下
<IfModule mod_watch.c>
# Allows the URL used to query virtual host data:
#
# http://www.snert.com/watch-info
#
<Location /watch-info>
SetHandler watch-info
Order deny,allow
Deny from all
Allow from 127.0.0.1 192.168.1.0/24 59.120.209.208/28 59.120.37.184 59.120.37.185 59.120.37.186
</Location># Allows the URL used to query file owner and web
# server data:
#
# http://www.snert.com/~achowe/watch-info
# http://www.snert.com/~SERVER/watch-info
#
<Location /~*/watch-info>
SetHandler watch-info
Order deny,allow
Deny from all
Allow from 127.0.0.1 192.168.1.0/24 59.120.209.208/28 59.120.37.184 59.120.37.185 59.120.37.186
</Location>
# Intended for debugging and analysis of shared memory
# hash table and weenie files:
#
# http://www.snert.com/watch-table
#
<Location /watch-table>
SetHandler watch-table
Order deny,allow
Deny from all
Allow from 127.0.0.1 192.168.1.0/24 59.120.209.208/28 59.120.37.184 59.120.37.185 59.120.37.186
</Location><Location /watch-flush>
SetHandler watch-flush
Order deny,allow
Deny from all
Allow from 127.0.0.1 192.168.1.0/24 59.120.209.208/28 59.120.37.184 59.120.37.185 59.120.37.186
</Location><Location /watch-list>
SetHandler watch-list
Order deny,allow
Deny from all
Allow from 127.0.0.1 192.168.1.0/24 59.120.209.208/28 59.120.37.184 59.120.37.185 59.120.37.186
</Location>
</IfModule>
8。看設定OK不OK,執行 apachectl configtest,再來 service httpd restart
9。至 192.168.1.15 監控主機的 /etc/munin/plugins/ 底下執行 ln -sf /usr/share/munin/plugins/apache_mod_watch_ apache_mod_watch_192.168.1.15
10。service munin-node restart
11。sudo -u munin munin-cron

上一篇
返回
下一篇
標籤:


ngrep 類似 wireshark、tcpdump 的封包偵測工具 (2010-01-14 00:57)
Nagios 的外掛 NagVIs 更圖形化了 (2009-05-19 10:54)
Apache 使用 mod_php 讓 VH 有獨立的 php.ini 檔 (2009-02-06 10:34)
Apache + 可以限制 .htaccess 只能使用某些參數嗎 (2009-02-02 18:52)
Nagios 監控通知概念 (2008-12-19 10:23)
對 Apache 連線數多個概念 (2008-10-29 11:50)
使用 uptimeparty 監控主機是否還活著 (2008-09-23 12:52)
Apache 模組 mod_defensible 阻擋 spammer (2008-09-18 20:15)
apache module 模組 mod_spamhaus 阻擋 Spammers/Hackers (2008-09-18 14:22)