前提として別サーバーにmuninのマスタがいてNASにもmunin-nodeを入れて監視したい。
munin-nodeインストール
CentOSのマスタ側にyumでインストールしたMuninサーバーに合わせて、2.0.14のnodeのみをReadeyNASにインストール
# apt-get install libnet-server-perl liblist-moreutils-perl gawk
# wget http://ftp.jp.debian.org/debian/pool/main/m/munin/munin-node_2.0.14-1_all.deb
# wget http://ftp.jp.debian.org/debian/pool/main/m/munin/munin-common_2.0.14-1_all.deb
# wget http://ftp.jp.debian.org/debian/pool/main/m/munin/munin-plugins-core_2.0.14-1_all.deb
# wget http://ftp.jp.debian.org/debian/pool/main/m/munin/munin-doc_2.0.14-1_all.deb
# dpkg -i munin*.deb
マスタからの接続を許可する
node側の/etc/munin/munin-node.confにマスタのIPを追加。うちはcidrで設定
cidr_allow 192.168.11.0/24
マスタ側から
$ telnet <NASのIP> 4949
Trying xxx.xxx.xxx.xxx...
Connected to xxx.xxx.xxx.xxx.
Escape character is '^]'.
# munin node at nas-BF-16-9C
となればOK
マスタにnodeを追加
マスタの/etc/munin/munin.confに
[ready-nas]
address xxx.xxx.xxx.xxx
use_node_name yes
を追加
マスタとnodeそれぞれ
sudo /etc/init.d/munin-node restart
して設定反映。次のcronのタイミングでマスタ側の画面に"ready-nas"が追加される。
強制的にcron叩く場合は
sudo -u munin /usr/bin/munin-cron
node側のログに
2013/06/08-20:31:09 [19834] Error output from hddtemp_smartctl:
2013/06/08-20:31:09 [19834] [ERROR] Command /usr/sbin/smartctl -A --nocheck=standby /dev/sda on drive sda failed: 512. The plugin needs to have read permission on all monitored devices.
が出てて、値がとれていなかった(nan)のでいったん
rm -f /etc/munin/plugins/hddtemp_smartctl
してhddtemp_smartctlをOFFった