Last-modified: 2011-12-26 (月) 01:24:43
Munin/CentOSへのインストール

概要

Muninをインストールします。
CentOSにMunin本体をインストールし、CentOSDebianWindowsを監視させます。
ここではMunin本体の設定のみ解説します。

以下のような環境を例にします。

munin設定出力結果パス/opt/www/munin
Apache設定ルートパス/opt/httpd
結果へのアクセスmunin.hoge.com
接続許可192.168.100.*、127.0.0.1
CentOS名前CentOS_1
IP192.168.100.10
役割munin本体、muinnノード
Debian名前Debian_1
IP192.168.100.20
役割muinnノード
Windows名前Windows_1
IP192.168.100.30
役割muinnノード

手順

  1. インストールします。
    Everything is expanded.Everything is shortened.
      1
    
     
    
    yum install munin
  2. /etc/munin/munin.confを編集します。
    Everything is expanded.Everything is shortened.
      1
      2
      3
      4
      5
      6
      7
      8
      9
     10
     11
     12
     13
     14
     15
     16
     17
     18
     19
    
    -
    !
     
    -
    !
     
     
     
     
     
     
     
     
     
     
    -
    !
     
     
    
    # 結果出力パス
    htmldir /opt/www/munin
     
    # 収集先
    [CentOS_1]
        address 192.168.100.10
        use_node_name yes
     
    [Debian_1]
        address 192.168.100.20
        use_node_name yes
     
    [Windows_1]
        address 192.168.100.30
        use_node_name yes
        # メモリ情報取得用設定
        memory.swap.label swap
        memory.swap.draw STACK
        memory.swap.info Swap memory used.
  3. /opt/httpd/conf/httpd.confを編集します。
    Everything is expanded.Everything is shortened.
      1
      2
      3
      4
      5
      6
      7
      8
    
    -
    !
     
     
     
     
     
     
    
    # munin
    <Directory "/opt/www/munin">
        Options None
        AllowOverride None
        DirectoryIndex index.html
        Order Allow,Deny
        Allow from 192.168.100   127.0.0.1
    </Directory>
  4. /opt/httpd/conf/extra/httpd-vhosts.confを編集します。
    Everything is expanded.Everything is shortened.
      1
      2
      3
      4
      5
    
    -
    !
     
     
     
    
    # munin
    <VirtualHost *:80>
        ServerName munin.hoge.com
        DocumentRoot "/opt/www/munin"
    </VirtualHost>
  5. /opt/www/munin作成します。
    Everything is expanded.Everything is shortened.
      1
      2
    
     
     
    
    mkdir /opt/www/munin
    chown munin.munin /opt/www/munin
  6. Apacheを再起動します。
    Everything is expanded.Everything is shortened.
      1
    
     
    
    /etc/init.d/httpd restart

検証時の環境

参考