前回からの続き。ちょっと古い Vine にtarball で munin-node をインストール。
tarball で munin-node をインストール
http://munin-monitoring.org/
http://sourceforge.net/projects/munin/files/ ← こちらから入手。
$ tar zxvf munin-1.4.5.tar.gz
tar の中の INSTALL を読む。
node に必要なライブラリを cpan からインストールする。
# perl -MCPAN -e shell install Net::Server install Net::Server::Fork install Time::HiRes install Net::SNMP install Crypt::DES install Digest::SHA1 install Digest::HMAC install Net::SSLeay
または cpanminus をインストールして。
# cpan App::cpanminus # cpanm install Net::Server Net::Server::Fork Time::HiRes Net::SNMP Crypt::DES Digest::SHA1 Digest::HMAC Net::SSLeay
munin ユーザを足す。uid、gid は 500 以下。
make、make install。
# groupadd -g 103 munin # useradd -u 103 -g munin munin $ make # make install-common-prime install-node-prime install-plugins-prime
起動スクリプトをコピー。
cp /root/munin-1.4.5/dists/redhat/munin-node.rc /etc/init.d/munin-node
[root@aaaa munin-1.4.5]# diff -BbwENur /root/munin-1.4.5/dists/redhat/munin-node.rc /etc/init.d/munin-node
--- /root/munin-1.4.5/dists/redhat/munin-node.rc 2005-11-07 01:54:02.000000000 +0900
+++ /etc/init.d/munin-node 2011-03-10 18:27:26.000000000 +0900
@@ -2,10 +2,10 @@
#
# munin-node Control the Munin Node Server (formerly Linpro RRD client)
#
-# chkconfig: 2345 90 10
+# chkconfig: - 90 10
# description: munin node agents
# processname: munin-node
-# config: /etc/munin/munin-node.conf
+# config: /etc/opt/munin/munin-node.conf
# pidfile: /var/run/munin/munin-node.pid
# Source function library.
@@ -21,7 +21,7 @@
case "$1" in
start)
echo -n "Starting Munin Node: "
- /usr/sbin/munin-node &
+ /opt/munin/sbin/munin-node &
sleep 1
pkill -0 $PROCNAME
RETVAL=$?
/opt/munin/sbin/munin-node-configure --shell | sh -x /etc/init.d/munin-node restart /sbin/chkconfig munin-node on
このスクリプトを動かすと、pkill がないと言われたので。
# apt-get install pgrep
conf はここ。rpm でインストールしたときの場所はここでした。→『/etc/munin/munin-node.conf』
# vi /etc/opt/munin/munin-node.conf … allow ^192\.168\.1\.152$ #(Munin 描画サーバアドレスからのアクセスを許可) …
munin-node plugin の挙動の設定。rpm でインストールしたときの場所はここでした。→『/etc/munin/plugin-conf.d/munin-node』
# vi /etc/opt/munin/plugin-conf.d/munin-node [qmailqstat] user root
