環境は Debian GNU/Linux 6.0.8 squeeze.

まず、 munin のパッケージをインストールする。


# apt-get install munin munin-node

/usr/share/munin/plugins にある mysql 関係のプラグインに、 /etc/munin/plugins からシンボリックリンクを張る。


# ln -s /usr/share/munin/plugins/mysql_bytes /etc/munin/plugins/mysql_bytes
# ln -s /usr/share/munin/plugins/mysql_innodb /etc/munin/plugins/mysql_innodb
# ln -s /usr/share/munin/plugins/mysql_queries /etc/munin/plugins/mysql_queries
# ln -s /usr/share/munin/plugins/mysql_slowqueries /etc/munin/plugins/mysql_slowqueries
# ln -s /usr/share/munin/plugins/mysql_threads /etc/munin/plugins/mysql_threads

munin-node を再起動。


# /etc/init.d/munin-node restart

これで MySQL 関係の監視が追加されて、 MySQL のグラフが表示されるようになる。

ちなみに環境。


# cat /etc/debian_version
6.0.8
 
# uname -mrsvo
Linux 2.6.32-5-amd64 #1 SMP Mon Sep 23 22:14:43 UTC 2013 x86_64 GNU/Linux
 
# aptitude search munin
i   munin                 - ネットワーク中をグラフ化するフレームワーク (グラフ生成/データ収集器)
i A munin-common          - network-wide graphing framework (common)
i   munin-java-plugins    - network-wide graphing framework (java plugins for node)
i   munin-libvirt-plugins - Munin plugins using libvirt
i   munin-node            - network-wide graphing framework (node)
p   munin-plugins-extra   - network-wide graphing framework (user contributed plugins for node)

tags: debian munin

Posted by NI-Lab. (@nilab)