MuninでHDDの温度を監視します。
HDDのステータスはS.M.A.R.Tを使えれば取得できるはずなので、まずはsmartctlコマンドが動作するか確認しておきます。
なお、smartctlコマンドはkernel-utilsパッケージに含まれています。
$ rpm -qf /usr/sbin/smartctl kernel-utils-2.4-13.1.99
MuninでS.M.A.R.TからHDDの温度情報を取得するにはhddtemp_smartctlプラグインを使います。
プラグインを有効にするためシンボリックリンクを作成します。
# cd /etc/munin/plugins/ # ln -s /usr/local/munin/lib/plugins/hddtemp_smartctl hddtemp_smartctl
hddtemp_smartctl用の設定を追加します。
ここでは/dev/hdeがHDDになっています。
/etc/munin/plugin-conf.d/plugins.conf
[hddtemp_smartctl] user root env.smartctl /usr/sbin/smartctl env.drives hde
動作確認のため実行してみます。
# /usr/local/munin/sbin/munin-run --servicedir /etc/munin/plugins hddtemp_smartctl hde.value 60
最後にエージェントを再起動して終了になります。
# /sbin/service munin restart Stopping Munin Node agents: [ OK ] Starting Munin Node: [ OK ]
コメント