Munin version 2.0.25をCentOS 6.5にインストールした時のメモ

MUNINインストールと設定

インストール
# yum -y install munin --enablerepo=epel

MUNINのログインID、パスワード設定
# htpasswd -b /etc/munin/munin-htpasswd username password

アパッチ設定チェック
# apachectl configtest

アパッチ再起動
# apachectl -k graceful

muninノード開始
# service munin-node start

muninを自動起動に設定
# chkconfig munin-node on

テストします。

アクセスできればインストールと初期設定が終了です。
http://**.**.**.**/munin/

 

Apacheプラグインの設定

プラグインの配置
# ln -s /usr/share/munin/plugins/apache_accesses /etc/munin/plugins/apache_accesses
# ln -s /usr/share/munin/plugins/apache_processes /etc/munin/plugins/apache_processes
# ln -s /usr/share/munin/plugins/apache_volume /etc/munin/plugins

MUNINの再起動
# service munin-node restart

Apacheを再起動
# apachectl configtest
# apachectl -k graceful

※5分立たないと有効になりません。
※Apacheのサーバステータスを有効にする必要があります。

 

Mysqlプラグインの設定

MySQL Develをインストール
# yum install mysql-devel

プラグインの配置
# ln -s /usr/share/munin/plugins/mysql_ /etc/munin/plugins/mysql_commands
# ln -s /usr/share/munin/plugins/mysql_ /etc/munin/plugins/mysql_innodb_bpool
# ln -s /usr/share/munin/plugins/mysql_ /etc/munin/plugins/mysql_innodb_io
# ln -s /usr/share/munin/plugins/mysql_ /etc/munin/plugins/mysql_innodb_log
# ln -s /usr/share/munin/plugins/mysql_ /etc/munin/plugins/mysql_innodb_tnx
# ln -s /usr/share/munin/plugins/mysql_ /etc/munin/plugins/mysql_select_types
# ln -s /usr/share/munin/plugins/mysql_ /etc/munin/plugins/mysql_table_locks

MySQLへの接続情報を設定
# vi /etc/munin/plugin-conf.d/munin-node

[mysql*]
env.mysqlconnection DBI:mysql:mysql;host=127.0.0.1;port=3306
env.mysqluser username
env.mysqlpassword password

動作確認
# cd /etc/munin/plugins
# /usr/sbin/munin-run mysql_commands
⇒値が出力されれば設定終了です。