SSブログ

Munin Unboundの可視化 (FreeBSD 9.2R、2014/04/14) [FreeBSD]

せっかくUnboundを導入するならと、Muninでに可視化に挑戦してみました。
基本的な設定はプラグインの中に記載されています。unbound-control-setupを実行して制御用の鍵を作成するのを忘れないようにしましょう。また、stateファイルの作成場所が適当でないのでFreeBSD向けに直してあげます。(うちでは/var/munin/plugin-state/unbound-stateにしました)
root@atom:~ # cat /usr/local/etc/munin/plugins/unbound_munin_by_class
# To install; enable statistics and unbound-control in unbound.conf
#       server:         extended-statistics: yes
#                       statistics-cumulative: no
#                       statistics-interval: 0
#       remote-control: control-enable: yes
# Run the command unbound-control-setup to generate the key files.
...
# You can set them in your munin/plugin-conf.d/plugins.conf file
# with:
# [unbound*]
# user root
# env.statefile /usr/local/var/munin/plugin-state/unbound-state
# env.unbound_conf /usr/local/etc/unbound/unbound.conf
# env.unbound_control /usr/local/sbin/unbound-control
# env.spoof_warn 1000
# env.spoof_crit 100000

で、後はグラフ化されるだけ…と思っていたら、待てど暮らせど一向にグラフ化されません。…おかしい。とりあえずプラグインを直接実行してみたら大量のエラーメッセージが。
root@atom:~ # /usr/local/etc/munin/plugins/unbound_munin_by_class
/usr/local/etc/munin/plugins/unbound_munin_by_class: cannot create /usr/local/var/munin/plugin-state/unbound-state.lock: No such file or directory
/usr/local/etc/munin/plugins/unbound_munin_by_class: cannot create /usr/local/var/munin/plugin-state/unbound-state.lock: No such file or directory
/usr/local/etc/munin/plugins/unbound_munin_by_class: cannot create /usr/local/var/munin/plugin-state/unbound-state.lock: No such file or directory
/usr/local/etc/munin/plugins/unbound_munin_by_class: cannot create /usr/local/var/munin/plugin-state/unbound-state.lock: No such file or directory
...

どうやらplugins.confのstateファイル設定の記述が効いていないようです。該当行あたりをいろいろ見てみましたが、イマイチよく分からず。変に触ってスクリプトを壊しては元も子もないので、荒っぽいですがとりあえず正しい設定値を静的コーディングしてしましました。
root@atom:~ # vi /usr/local/etc/munin/plugins/unbound_munin_by_class
...
#state=${statefile:-/usr/local/var/munin/plugin-state/unbound-state}
state="/var/munin/plugin-state/unbound-state"

20140414_unbound_munin_by_type-day.png

タグ:munin
nice!(0)  コメント(0) 
共通テーマ:日記・雑感

nice! 0

コメント 0

コメントを書く

お名前:
URL:
コメント:
画像認証:
下の画像に表示されている文字を入力してください。