農家SEの覚書き

忘れっぽいので、自分用の備忘録です。

CentOS7にmuninノードのインストール(apache監視)

EPELのリポジトリを追加

yum install -y epel-release

EPELのリポジトリは通常時は利用しないように無効化

yum-config-manager --disable epel

EPELのリポジトリから muninノードをインストール

yum --enablerepo=epel install munin-node

apacheサーバ監視の為、設定ファイルを追加

vi etc/httpd/conf.d/status.conf

↓以下をコピーして保存

# 拡張ステータスの有効化
ExtendedStatus On
<Location /server-status>
  # server-statusハンドラーの有効化
  SetHandler server-status
  # アクセス制御
  Require ip 127.0.0.1
</Location>

apacheの設定をロード

systemctl reload httpd

apache監視用のプラグインを追加

cd /etc/munin/plugins
ln -s /usr/share/munin/plugins/apache_accesses
ln -s /usr/share/munin/plugins/apache_processes
ln -s /usr/share/munin/plugins/apache_volume

munin(親)のIPを許可

vi /etc/munin/munin-node.conf

# A list of addresses that are allowed to connect.  This must be a
# regular expression, since Net::Server does not understand CIDR-style
# network notation unless the perl module Net::CIDR is installed.  You
# may repeat the allow line as many times as you'd like

allow ^127\.0\.0\.1$
allow ^192\.168\.1\.10$ # ←ここにIPを追加
allow ^::1$

munin-nodeの起動と自動起動設定

systemctl start munin-node
systemctl enable munin-node