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
</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
</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
</Location>

<Location /watch-flush>
SetHandler watch-flush
Order deny,allow
Deny from all
Allow from 127.0.0.1 192.168.1.0/24
</Location>

<Location /watch-list>
SetHandler watch-list
Order deny,allow
Deny from all
Allow from 127.0.0.1 192.168.1.0/24
</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

12。瀏覽 http://192.168.1.15/munin/

最後修改日期: 2013 年 07 月 15 日

作者

留言

撰寫回覆或留言

發佈留言必須填寫的電子郵件地址不會公開。