#vim /etc/yum.repos.d/dag.repo
[dag]
name=Dag RPM Repository for Red Hat Enterprise Linux
baseurl=http://apt.sw.be/redhat/el$releasever/en/$basearch/dag
gpgcheck=1
gpgkey=http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt
enabled=1
# vim /etc/munin/munin.conf
Configfile for Munin master
dbdir /var/lib/munin/
htmldir /var/www/munin/
#如果/var/www是web服务器的主目录的话,就在里面创建一个用户名为munin的目录否则munin无法写入;名称随便可以起,例子中的名称也是munin
logdir /var/log/munin
rundir /var/run/munin/
# This is an example of the correct way to activate Nagios warnings
contact.nagios.command /usr/local/nagios/bin/send_nsca nagioshost.example.com -c /usr/local/nagios/etc/send_nsca.cfg -to 60
# From and including the first host, no more global directives can be defined.
# Everything after one host definition belongs to that host, until another host definition is found.
[foo.example.com] # 创建一个名为foo.example.com的监控
#
address 12.23.34.56 #被监控的IP地址为12.23.34.56
4. 被监控端配置
# vim /etc/munin/munin-node.conf
log_level 4
log_file /var/log/munin/munin-node.log
port 4949
pid_file /var/run/munin/munin-node.pid
background 1
host *
user root
group root
setsid yes
ignore_file ~$
ignore_file \.bak$
ignore_file %$
ignore_file \.dpkg-(tmp|new|old|dist)$
ignore_file \.rpm(save|new)$
# host_name localhost.localdomain
allow ^127\.0\.0\.1$
#指定自己允许被那个IP地址监控,写成正则表达式的格式,例如允许被12.21.34.43监控就写成allow ^12\.21\.34\.43$