Debian/Ubuntu Linux에서 Munin을 이용하여 서버와 클라이언트를 나눠 모니터링 하는 방법에 대해 알아 보겠습니다.
(tested : Debian Squeeze)

– Server 설정

* munin 설치

root@yongbok:~# apt-get install -y munin munin-node

 

* munin.conf 설정
사용자 환경에 맞도록 설정 합니다.

root@yongbok:~# nano /etc/munin/munin.conf
dbdir /var/lib/munin
htmldir /var/cache/munin/www
logdir /var/log/munin
rundir /var/run/munin
includedir /etc/munin/munin-conf.d

[yongbok;www]
address 127.0.0.1
use_node_name yes

[yongbok;mirror]
address 192.168.0.2
use_node_name yes

 

* munin-node.conf 설정

root@yongbok:~# nano /etc/munin/munin-node.conf
host_name yongbok.net
allow ^127\.0\.0\.1$
allow ^192\.168\.0.\2$

 

– Client 설정

root@yongbok:~# apt-get install -y munin-node
root@yongbok:~# nano /etc/munin/munin-node.conf
host_name mirror.yongbok.net
allow ^127\.0\.0\.1$
allow ^192\.168\.0\.1$

 

– 공통
munin-node를 실행합니다.

root@yongbok:~# /etc/init.d/munin-node start
Starting Munin-Node: done.

 

이제 매 5분마다 그래프가 그려집니다.
정상적으로 데이터를 읽어오는지 확인 합니다.

 

* Server logs

root@yongbok:~# tail -F /var/log/munin/munin-update.log
2013/03/18 23:10:01 Opened log file
2013/03/18 23:10:01 [INFO]: Starting munin-update
2013/03/18 23:10:05 [INFO] Reaping Munin::Master::UpdateWorker<yongbok;mirror>. Exit value/signal: 0/0
2013/03/18 23:10:05 [INFO] Reaping Munin::Master::UpdateWorker<yongbok;www>. Exit value/signal: 0/0
2013/03/18 23:10:05 [INFO]: Munin-update finished (3.45 sec)

 

* Client logs

root@yongbok:~# tail -F /var/log/munin/munin-node.log
2013/03/18-23:10:09 CONNECT TCP Peer: “192.168.0.1:56564” Local: “192.168.0.2:4949

 

Example graph
if_eth0-day