user icon

Munin を Ubuntu にインストールする

MRTG よりラクちんにサーバーリソースをモニタリングしたいなぁ、ということでセットアップが簡単と評判の Munin を試してみることにしました。

ターゲットのサーバーは Debian なのですが、個人的趣味で実験環境は Ubuntu です。どちらもパッケージ管理は APT ですし、いいよね?

Debian/Ubuntu は Munin のパッケージを入れるだけで動いちゃうらしいです。

どれどれ、パッケージあるかな〜。

$ sudo aptitude search munin
pi  munin                                                               - network-wide graphing framework (grapher/gatherer)                           
p   munin-libvirt-plugins                                               - Munin plugins using libvirt                                                  
pi  munin-node                                                          - network-wide graphing framework (node)                                       
p   munin-plugins-extra                                                 - network-wide graphing framework (user contributed plugins for node)          

ありました。munin がグラフ化をおこなうソフトで munin-node がリソースの情報を収集するソフトです。

localhostのリソース監視をさせたいので2つまとめてインストール。

$ sudo aptitude install munin munin-node
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Reading extended state information      
Initializing package states... Done
The following NEW packages will be installed:
  gawk{a} libdate-manip-perl{a} libhtml-template-perl{a} libio-multiplex-perl{a} libnet-cidr-perl{a} libnet-server-perl{a} libnet-snmp-perl{a} 
  librrd4{a} librrds-perl{a} munin munin-node rrdtool{a} 
0 packages upgraded, 12 newly installed, 0 to remove and 0 not upgraded.
Need to get 3,227kB of archives. After unpacking 8,442kB will be used.
Do you want to continue? [Y/n/?] 

gawk やら perl のライブラリやらに依存してる模様。ほいほい、全部入れちゃって〜「Y」。

Writing extended state information... Done
Get:1 http://us.archive.ubuntu.com karmic/main gawk 1:3.1.6.dfsg-0ubuntu2 [525kB]
Get:2 http://us.archive.ubuntu.com karmic/main libdate-manip-perl 5.54-1 [173kB]
Get:3 http://us.archive.ubuntu.com karmic/main libhtml-template-perl 2.9-1 [65.8kB]
Get:4 http://us.archive.ubuntu.com karmic/main libio-multiplex-perl 1.10-1 [22.9kB]
Get:5 http://us.archive.ubuntu.com karmic/main libnet-cidr-perl 0.13-1 [14.6kB]
Get:6 http://us.archive.ubuntu.com karmic/main libnet-server-perl 0.97-1ubuntu1 [141kB]
Get:7 http://us.archive.ubuntu.com karmic/main libnet-snmp-perl 5.2.0-1 [112kB]
Get:8 http://us.archive.ubuntu.com karmic-updates/main librrd4 1.3.1-4ubuntu2.1 [241kB]
Get:9 http://us.archive.ubuntu.com karmic-updates/main librrds-perl 1.3.1-4ubuntu2.1 [79.0kB]
Get:10 http://us.archive.ubuntu.com karmic-updates/main rrdtool 1.3.1-4ubuntu2.1 [596kB]
Get:11 http://us.archive.ubuntu.com karmic/main munin 1.2.6-13ubuntu3 [613kB]
Get:12 http://us.archive.ubuntu.com karmic/main munin-node 1.2.6-13ubuntu3 [644kB]
Fetched 3,227kB in 5s (604kB/s)  
Selecting previously deselected package gawk.
(Reading database ... 29378 files and directories currently installed.)
Unpacking gawk (from .../gawk_1%3a3.1.6.dfsg-0ubuntu2_i386.deb) ...
Selecting previously deselected package libdate-manip-perl.
Unpacking libdate-manip-perl (from .../libdate-manip-perl_5.54-1_all.deb) ...
Selecting previously deselected package libhtml-template-perl.
Unpacking libhtml-template-perl (from .../libhtml-template-perl_2.9-1_all.deb) ...
Selecting previously deselected package libio-multiplex-perl.
Unpacking libio-multiplex-perl (from .../libio-multiplex-perl_1.10-1_all.deb) ...
Selecting previously deselected package libnet-cidr-perl.
Unpacking libnet-cidr-perl (from .../libnet-cidr-perl_0.13-1_all.deb) ...
Selecting previously deselected package libnet-server-perl.
Unpacking libnet-server-perl (from .../libnet-server-perl_0.97-1ubuntu1_all.deb) ...
Selecting previously deselected package libnet-snmp-perl.
Unpacking libnet-snmp-perl (from .../libnet-snmp-perl_5.2.0-1_all.deb) ...
Selecting previously deselected package librrd4.
Unpacking librrd4 (from .../librrd4_1.3.1-4ubuntu2.1_i386.deb) ...
Selecting previously deselected package librrds-perl.
Unpacking librrds-perl (from .../librrds-perl_1.3.1-4ubuntu2.1_i386.deb) ...
Selecting previously deselected package rrdtool.
Unpacking rrdtool (from .../rrdtool_1.3.1-4ubuntu2.1_i386.deb) ...
Selecting previously deselected package munin.
Unpacking munin (from .../munin_1.2.6-13ubuntu3_all.deb) ...
Selecting previously deselected package munin-node.
Unpacking munin-node (from .../munin-node_1.2.6-13ubuntu3_all.deb) ...
Processing triggers for install-info ...
Processing triggers for man-db ...
Setting up gawk (1:3.1.6.dfsg-0ubuntu2) ...

Setting up libdate-manip-perl (5.54-1) ...
Setting up libhtml-template-perl (2.9-1) ...
Setting up libio-multiplex-perl (1.10-1) ...
Setting up libnet-cidr-perl (0.13-1) ...
Setting up libnet-server-perl (0.97-1ubuntu1) ...
Setting up libnet-snmp-perl (5.2.0-1) ...
Setting up librrd4 (1.3.1-4ubuntu2.1) ...

Setting up librrds-perl (1.3.1-4ubuntu2.1) ...
Setting up rrdtool (1.3.1-4ubuntu2.1) ...
Setting up munin (1.2.6-13ubuntu3) ...
Adding system user `munin' (UID 103) ...
Adding new group `munin' (GID 110) ...
Adding new user `munin' (UID 103) with group `munin' ...
Not creating home directory `/var/lib/munin'.

Setting up munin-node (1.2.6-13ubuntu3) ...
Initializing plugins..done.
Restarting munin-node.. * Stopping Munin-Node
   ...done.
 * Starting Munin-Node
   ...done.
 * Starting Munin-Node
   ...done.

Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
Reading package lists... Done             
Building dependency tree       
Reading state information... Done
Reading extended state information      
Initializing package states... Done
Writing extended state information... Done

おけ。インストールすると動きだします。

しばらく待って、グラフの作成先を確認してみると

$ ls /var/www/munin/
definitions.html  index.html  localdomain  logo.png  style.css

できとる、できとる。ほんと楽チンだ。

Facebooktwitterlinkedintumblrmail

Tags: ,

Trackback

Comment

it was very interesting to read.
I want to quote your post in my blog. It can?
And you et an account on Twitter?

I’m sorry for delaying in answering.
Of course, it is OK.

@murave on Twitter.
But writes in Japanese.

名前
E-mail
URL
コメント

日本語が含まれない投稿は無視されますのでご注意ください。(スパム対策)