浅谈 munin ,服务器监控程序

本文介绍Munin监控系统的安装与配置流程,包括master和node的设置,并提供了Apache配置示例,帮助读者快速上手服务器监控。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

[size=x-large][b]浅谈 munin ,服务器监控程序[/b][/size]
blog 地址:[url]http://edisonlz.iteye.com[/url]
Munin 分为master和node 两部分,Munin master为数据中心,Munin node 为节点中心,向master提供数据,master将数据汇总并进行分析。并支持plugin 进行相关程序监控。
live demo : [url]http://munin.ping.uio.no/[/url]

[b]1.安装[/b]


Munin master
# apt-get install munin

Munin node
# apt-get install munin-node


如果您使用suse请加入源 : http://packman.mirrors.skynet.be/pub/packman/suse/11.2/
[b]
2.配置master[/b]
emacs /etc/munin.conf
# Configfile for Munin master
dbdir /var/lib/munin/
htmldir /var/www/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] # Defines the group "example.com" and then
# "foo.example.com" under that group.
address localhost # The address (IP or host name) of the host, where munin-node is running.

[example.com;bar.example.com] # Same as above, but with an explicit definition.
# of the host's group.
address bar.example.com # The address.
df.contacts no # Don't warn Nagios (or whatever) if the 'df' plugin exceed warning values.

[Groupname;] # Defines the group "Groupname"
contacts nagios # Notifications shall go to nagios for hosts in this group

[Groupname;baz.example.com] # Associates the host baz.example.com to this group
address baz.example.com # The address of the host, where munin-node is running.
update no # Specifies that no services on this host should be updated by munin-update



配置apache

<web-app>

<display-name>Munin</display-name>
<description>Monitoring Server Based on RRD Tool</description>
<welcome-file-list>index.html</welcome-file-list>

<!-- optional access control -->
<authenticator>
<type>com.caucho.server.security.XmlAuthenticator</type>
<init>
<user>username:password:munin</user>
<password-digest>none</password-digest>
</init>
</authenticator>
<login-config>
<auth-method>basic</auth-method>
</login-config>
<security-constraint url-pattern="/*" role-name="munin"/>

<servlet servlet-name="cgiservlet" servlet-class="com.caucho.servlets.CGIServlet" />
<servlet-mapping url-pattern="/cgi/munin-cgi-graph" servlet-name="cgiservlet" />
<path-mapping url-pattern="/*" real-path="/var/www/html/munin" />

</web-app>



[b]3.配置node[/b]
emacs /etc/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$
allow ^192\.168\.10\.3$
cidr_allow 10.20.30.0/16
cidr_deny 10.10.30.12/24


4.启动服务
sudo /etc/init.d/munin start
sudo /etc/init.d/munin-node start



参考地址:
[url]http://munin.projects.linpro.no/wiki/LinuxInstallation[/url]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值