ホーム > CentOS5.3 > munin プラグインを追加 ApacheとMysql

munin プラグインを追加 ApacheとMysql

監視ツール muninのプラグインを追加しました。
今回追加したプラグインは、ApacheとMysqlのグラフです。
デフォルトでプラグインは有効になっていないので、下記の手順で有効にしてみました。



apache_accesses apache_processes apache_volume
Apacheのプラグインはあらかじめ mod_statusを有効にしなければなりません。

Statusを使用可能にするため、以下のコードを追加

[root@centos ~]# vi /etc/httpd/conf/httpd.conf

LoadModule status_module modules/mod_status.so

ExtendedStatus On

<Location /server-status>
   SetHandler server-status
   Order Deny,Allow
   Deny from all
   Allow from 127.0.0.1
   Allow from localhost
</Location>

設定の反映
[root@centos ~]# /etc/rc.d/init.d/httpd restart

プラグインを有効化するためシンボリックリンクを張る。
[root@centos ~]#ln -s /usr/share/munin/plugins/apache_accesses /etc/munin/plugins/apache_accesses
[root@centos ~]#ln -s /usr/share/munin/plugins/apache_processes /etc/munin/plugins/apache_processes
[root@centos ~]#ln -s /usr/share/munin/plugins/apache_volume /etc/munin/plugins/apache_volume
80ポート以外のポートも監視したい場合は[apache*]をmunin-nodeに追加してください。
[root@centos ~]# vi /etc/munin/plugin-conf.d/munin-node
[apache*]
env.ports 80 443

[root@centos ~]# /etc/init.d/munin-node restart ←設定反映
Mysqlのグラフ mysql_bytes mysql_isam_space_ mysql_queries
mysql_slowqueries mysql_threads
プラグインを有効化するためシンボリックリンクを張る。
[root@centos ~]#ln -s /usr/share/munin/plugins/mysql_bytes /etc/munin/plugins/mysql_bytes
[root@centos ~]#ln -s /usr/share/munin/plugins/mysql_isam_space_ /etc/munin/plugins/mysql_isam_space_
[root@centos ~]#ln -s /usr/share/munin/plugins/mysql_queries /etc/munin/plugins/mysql_queries
[root@centos ~]#ln -s /usr/share/munin/plugins/mysql_slowqueries /etc/munin/plugins/mysql_slowqueries
[root@centos ~]#ln -s /usr/share/munin/plugins/mysql_threads /etc/munin/plugins/mysql_threads
Mysqlの情報を所得するには、env.mysqlopts -u root -pパスワード が必要でした。
[root@centos ~]# vi /etc/munin/plugin-conf.d/munin-node
[mysql*]
env.mysqlopts -u root -pパスワード
env.mysqladmin /usr/bin/mysqladmin

[root@centos ~]# /etc/init.d/munin-node restart ←設定反映

関連する記事:

コメント:0

コメントフォーム
入力した情報を記憶する

トラックバック:2

この記事のトラックバック URL
http://kencom.biz/archives/2009/0427161537.php/trackback
トラックバックの送信元リスト
munin プラグインを追加 ApacheとMysql - KENCOM.BIZ より
pingback - KennyQi Blog » Blog Archive » サーバ監視ツール muninをyumでインストール より 2011年5月7日

[...] munin-node で監視情報を送信する(被監視側, CentOS 5.4) – Linux の使い方 munin プラグインを追加 ApacheとMysql – KENCOM.BIZ えぐち@エスアンドイーの日記 – (process:61787): Pango-WARNING **: Invalid UTF-8 [...]

pingback - Scientific Linux6.1でmuninを使ってみる | Free day より 2011年12月10日

[...] トネーム/munin/]にアクセスしてください ApacheやMySQLのグラフは各自で追加して下さい、私はこちらを参考にしました いやーでもいい時代ですね何か分からないことがあればGoogle先生に相談 [...]

ホーム > CentOS5.3 > munin プラグインを追加 ApacheとMysql

サイト内検索
VPS
domain
Linux
買い物
RSS KENCOM.BIZ
メタ情報

ページの上部に戻る