ムーミンインストール(続き)
※適当にインストールしているため、全く動作保証しませんので
よろしく。
munin-node の設定
vi /etc/opt/munin/munin-node.conf
# Set this if the client doesn't report the correct hostname when
# telnetting to localhost, port 4949
#
host_name 自マシンのホスト名# A list of addresses that are allowed to connect. This must be a
# regular expression, due to brain damage in Net::Server, which
# doesn't understand CIDR-style network notation. You may repeat
# the allow line as many times as you'd like# アクセス制限
allow ^127\.0\.0\.1$
# munin-nodeグラフ表示させるサーバのIPアドレスを記述する。
# 注:親muninとなっているmuninサーバの場合は、
# 子muninのサーバIPを追加していくこと
allow ^192\.168\.0\.1$
munin-node デーモンを実行させる
munin-nodeのは、親・子muninに関わらず起動させてください。
muninのソースディレクトリに移ってから
vi dists/redhat/muni-node.rc
#中身を編集(24行目のパスを変更)
/usr/sbin/munin-node
↓
/opt/munin/sbin/munin-node
# /etc/init.d に置く
cp dists/redhat/munin-node.rc /etc/init.d/munin-node# 登録
chkconfig --add munin-node
chkconfig --level=35 munin-node on
plugin の設定
インストールした直後ではプラグインの読み場所が違うらしく全然動きません。苦肉の策で、シンボリックリンクを張ります。
cd /etc/opt/munin/
rmdir plugins
ln -s /opt/munin/lib/plugins#この後、munin-nodeを起動させる
service munin-node start
cron に登録(通常は1台のみに登録)
cronに登録するのは、親側munin(グラフを表示させるWebサーバ)のみで行ってください。この処理が動作することによって、各マシン上のmunin-node *1へ通信してグラフデータを収集してくれます。
vi /etc/crontab
#---------------------
# munin-cron
0-59/5 * * * * munin /opt/munin/bin/munin-cron > /dev/null 2>&1
# --------------------
apache に登録
apacheがデフォルトで入っている場合は、/var/www/htmlがDocumentRootになってますので、
そこへリンク張っておきます。
ln -s /opt/munin/var/www /var/www/html/munin
ブラウザで動作確認
とりあえず、これで5分後には、各マシンのグラフが表示されるようになったと思いますので、
http://親muninサーバのIP/munin/
にアクセスして、グラフを確認してください。以上で完了です。