概要 †
Muninをインストールします。
CentOSにMunin本体をインストールし、CentOS、Debian、Windowsを監視させます。
ここではMunin本体の設定のみ解説します。
以下のような環境を例にします。
munin設定 | 出力結果パス | /opt/www/munin |
Apache設定 | ルートパス | /opt/httpd |
結果へのアクセス | munin.hoge.com |
接続許可 | 192.168.100.*、127.0.0.1 |
CentOS | 名前 | CentOS_1 |
IP | 192.168.100.10 |
役割 | munin本体、muinnノード |
Debian | 名前 | Debian_1 |
IP | 192.168.100.20 |
役割 | muinnノード |
Windows | 名前 | Windows_1 |
IP | 192.168.100.30 |
役割 | muinnノード |
手順 †
- インストールします。
- /etc/munin/munin.confを編集します。
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
| -
!
-
!
-
!
| htmldir /opt/www/munin
[CentOS_1]
address 192.168.100.10
use_node_name yes
[Debian_1]
address 192.168.100.20
use_node_name yes
[Windows_1]
address 192.168.100.30
use_node_name yes
memory.swap.label swap
memory.swap.draw STACK
memory.swap.info Swap memory used.
|
- /opt/httpd/conf/httpd.confを編集します。
1
2
3
4
5
6
7
8
| -
!
| <Directory "/opt/www/munin">
Options None
AllowOverride None
DirectoryIndex index.html
Order Allow,Deny
Allow from 192.168.100 127.0.0.1
</Directory>
|
- /opt/httpd/conf/extra/httpd-vhosts.confを編集します。
1
2
3
4
5
| -
!
| <VirtualHost *:80>
ServerName munin.hoge.com
DocumentRoot "/opt/www/munin"
</VirtualHost>
|
- /opt/www/munin作成します。
1
2
|
| mkdir /opt/www/munin
chown munin.munin /opt/www/munin
|
- Apacheを再起動します。
1
|
| /etc/init.d/httpd restart
|
- 動作確認を行ないます。
http://munin.hoge.comにアクセスし、値が取得されグラフ化していることを確認します。
(munin.hoge.comはあらかじめ名前解決出来るようにしておく必要があります)
検証時の環境 †
参考 †