TITLE:Muninの導入 *Muninの導入 [#ib8ceace] システムの状態を監視するツールとして、 [[RDDtool:http://oss.oetiker.ch/rrdtool/]]や[[Cacti:http://www.cacti.net/]]が有名。 今回は「簡単にインストールできて、いろんな情報が取れる」と評判の、 [[Munin:http://munin.projects.linpro.no/]]をインストールする。 **Muninのインストール [#yf45412c] EPELリポジトリを利用して、インストールする。依存関係でかなり多くのソフトウェアをインストールすることになる(はず)。 # yum --enablerepo=epel install munin munin-node とりあえずノードを起動するだけなら、次のように操作する。 # service httpd start ←Apache(httpd)がまだ起動していない場合 # service httpd restart ←Apache(httpd)が起動している場合 # service munin-node start # chkconfig munin-node on **Muninへのアクセス [#o68c14bf] Muninでは、5分ごとに情報を更新する。 デフォルトでは、「http://<インストールしたサーバ>/munin」へアクセスすれば、 情報が得られる。 **Muninの設定 [#zb372062] Muninでは、どんな情報を収集するかは、「プラグイン」として管理されている。 -インストール時に使用可能なプラグインは、/usr/share/munin/plugins/以下にある。 -実際に使用するプラグインは、/etc/munin/plugins/へシンボリックリンクが張られる。 したがって、収集したい情報を追加したい場合は、次のような手順になる。 +/usr/share/munin/plugins/に収集したい情報があるかどうか調べる --もしなければ、追加する --または設定を変更する +/etc/munin/plugins/に/usr/share/munin/plugins/の使用するプラグインへのシンボリックリンクを張る ***SATA HDDの温度をグラフにする [#v2e15cd6] 必要なコマンドをインストール。 # yum install smartmontools あと、プラグインも設定。 # ln -s /usr/share/munin/plugins/hddtemp_smartctl /etc/munin/plugins ただ、このままではIDEのHDDしか、温度を調べてくれない。 そこで、次のように設定ファイルを編集する。 # vi /etc/munin/plugin-conf.d/hddtemp_smartctl 編集内容は、たとえば次のような感じ。HDDが/dev/sdaと/dev/sdbの場合。 [hddtemp_smartctl] user root env.drives sda sdb ←追加 env.args_sda --all -d ata ←追加 env.args_sdb --all -d ata ←追加 サービスを再起動しておく。 # serice munin-node restart **HPのRAIDの情報を取る [#d1c93124] 通常のディスクの情報はとれるようになったけど、 HPのサーバを使っていて、SMART RAIDの情報を取る方法がなかなか見つからなかった。 プラグインを少し改良しないといけないけど、 下のリンク先の情報を使えば、可能になる。 -http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=472207 ***参考 [#z71e00b3] -http://centos.oss.sc/administration/munin/ -http://gigazine.net/index.php?/news/comments/20060904_munin/ -http://gigazine.net/index.php?/news/comments/20070120_munin_config/ -http://gigazine.net/index.php?/news/comments/20070930_munin_mysql_graph_blank/ -http://munin.projects.linpro.no/ -http://blog.landhere.info/article.php/20070706103806395 |