月別アーカイブ: 2011年1月

Munin をインストール。2/n (rpmforge で munin-node をインストール)


あんみつ



※写真と本文は関係ありません。


前回の続き。Redhat 系(CentOS、WhiteBox)。

rpmforge から munin-node をインストール

# yum --enablerepo=rpmforge install munin-node

munin-node の設定をする。(アクセス許可設定)

# vi /etc/munin/munin-node.conf
…
allow ^127\.0\.0\.1$
allow ^192\.168\.1\.152$    # munin(描画サーバ) のサーバ IP アドレス追加
…


# /etc/init.d/munin-node restart  # daemon 起動
# telnet localhost 4949Trying 127.0.0.1...      # 接続確認
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
# munin node at xen.localdomain
list      # node のリスト取得
cpu df df_inode entropy forks fw_packets http_loadtime if_err_eth0 if_eth0 interrupts iostat iostat_ios irqstats load memory munin_stats netstat ntp_kernel_err ntp_kernel_pll_freq ntp_kernel_pll_off ntp_offset open_files open_inodes postfix_mailqueue postfix_mailvolume proc_pri processes swap threads uptime users vmstat yum
Connection closed by foreign host.
# chkconfig munin-node on    #起動時 on


監視出来る項目はよしなに追加してくれるが、何で追加されないかは下記コマンドで確認できる。


# munin-node-configure --suggest


httpd status が有効になってないとか…。がわかる。設定変更後有効にしたいときは…。


# munin-node-configure --shell | sh
# /etc/init.d/munin-node restart  # daemon 再起動


とすると、/etc/munin/plugins/ にリンクを作成されて、munin-node 再起動すると有効になる。

munin (描画サーバ)側の設定。

# 追加したサーバを追加する。
…
[hoge.example.jp]
    address 192.168.1.1 # hoge のIPアドレス。
    use_node_name yes
…


しばらくすると描画される。(5 分おきにcron で描画される)

強制的に動かしたいなら /etc/cron.d/munin を参考にして、/usr/bin/munin-cron を起動すると描画する。root では実行できないので、 こんな感じ。『sudo -u munin /usr/bin/munin-cron』


次回(tarball で munin-node をインストール)へ続く。

Munin をインストール。1/n (rpmforge-release のインストール)


あんこう汁



※写真と本文は関係ありません。


Munin リソースモニタリングシステム
http://munin-monitoring.org/

munin(描画サーバ) → グラフを描画する。http://サーバ名/munin/ などでアクセスするとグラフが閲覧できる。
munin-node → 監視されるサーバにインストール。daemon で起動しておく。

Redhat 系(CentOS、WhiteBox)なら rpmforge-release をインストールして rpmforge を有効にして yum で簡単にインストールできた。

Vine(4.0、4.1 とちょっと古い) は SRPM で RPM 作りたかったけどパッケージが足らないと怒られるので、tarball でmunin-node をインストール。(後述
munin(描画サーバ) は rrdtool などの依存があったので Vine にはインストールしないことにした。

以下、Redhat 系(CentOS、WhiteBox)のインストール。

rpmforge-release の最新版をダウンロードしてインストール

http://packages.sw.be/rpmforge-release/


# wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el5.rf.i386.rpm
# rpm -ivh rpmforge-release-0.5.2-2.el5.rf.i386.rpm


『–enablerepo=rpmforge 』オプションつけたときだけ有効にしたいので。『 rpmforge.repo 』を書き直す。


# vi /etc/yum.repos.d/rpmforge.repo 
…
#enabled = 1
enabled = 0
…


munin(描画サーバ)をインストール


# yum --enablerepo=rpmforge search munin
# yum --enablerepo=rpmforge install munin


http://サーバ名/munin/ でアクセス出来る。
cron で 5 分おきにグラフが描画される。


次回(rpmforge で munin-node をインストール)へ続く。