- 帖子
- 1008
- 主题
- 761
- 精华
- 0
- 积分
- 1794
- 贡献
- 941
- 激情
- 7771
- 阅读权限
- 100
- 最后登录
- 2020-4-28
|
Munin 分为master和node 两部分,Munin master为数据中心,Munin node 为节点中心,向master提供数据,master将数据汇总并进行分析。并支持plugin 进行相关程序监控。 * B1 A* U9 x& J" e
live demo : http://munin.ping.uio.no/ " ?: Y# q6 {3 ~1 k' S7 o9 O# b
: I( D4 h! N$ x6 h1.安装
* q+ d4 w% K9 y+ l4 k! ]
4 V4 [9 a- t8 q( NMunin masterMunin node- # apt-get install munin-node
复制代码
$ i$ p/ M$ y7 z2 c; Y+ [$ X/ Y4 k& z
如果您使用suse请加入源 : http://packman.mirrors.skynet.be/pub/packman/suse/11.2/ 3 f1 @0 n8 r" F$ ^5 U/ _, N. q
. g; ^' }( u1 q
2.配置master
. f: d- z4 f: k. ^4 jemacs /etc/munin.conf I' J+ U3 W8 ^
" `' w7 Z) b% ^4 z5 O. R F
) g& ~- E9 |2 B9 Q
- # 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
2 ~4 b3 X E8 t; c7 _. B: N
2 f% `9 P8 Z3 a! }" x8 X
+ \* R( u9 R, _) m/ `' O; [$ j3 n. A, O9 g
. e$ H- E7 `" P& f8 g# j
- <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>
复制代码 3.配置node
$ z( @$ T# z3 a5 Q* yemacs /etc/munin-node.conf 2 F9 P: R6 l; w
! r1 {2 l5 c$ @2 A( ^! H' n
; ~% ^5 V& D7 E" E- h5 f0 _% ^
- 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
复制代码
9 L) O, e* ?9 ?2 x
5 r, t! Z' T ~; o L* H) W4.启动服务
/ L5 ]' ^( ^7 X3 ^2 m
" }7 o8 {. C* X5 y( L8 u- R% f" F) ?9 |0 x. s/ V: L. ?' x
- sudo /etc/init.d/munin start sudo /etc/init.d/munin-node start
复制代码 5 q, D; O0 H2 [
: s& }1 x$ d! e" m/ f7 b- o0 t- p! n
5 o/ _# G2 U* i3 r$ S3 _7 l* _- _
4 v* F" q- s8 @5 m1 Y
8 `2 z2 C* J6 P: F$ H参考地址:
5 O: J. H! ~" {4 Fhttp://munin.projects.linpro.no/wiki/LinuxInstallation |
|