码迷,mamicode.com
首页 > 其他好文 > 详细

ubuntu 下配置munin

时间:2014-05-16 00:05:58      阅读:455      评论:0      收藏:0      [点我收藏+]

标签:style   blog   class   code   c   java   

环境:

  "Ubuntu 13.10"   

 

安装:  

apt-get install munin munin-node
apt-get install apache2

 

配置:

1. vim /etc/munin/munin.conf    

bubuko.com,布布扣
dbdir   /var/lib/munin
htmldir /var/cache/munin/www
logdir /var/log/munin
rundir  /var/run/munin
tmpldir /etc/munin/templates
staticdir /etc/munin/static
cgitmpdir /var/lib/munin/cgi-tmp
includedir /etc/munin/munin-conf.d
graph_period second
graph_strategy cron
cgiurl_graph /munin-cgi/munin-cgi-graph
max_size_x 4000
max_size_y 4000
html_strategy cron
max_processes 16
[munin-test]
    address 127.0.0.1
    use_node_name yes
bubuko.com,布布扣

2. vim /etc/munin/munin-node.conf   

bubuko.com,布布扣
log_level 4
log_file /var/log/munin/munin-node.log
pid_file /var/run/munin/munin-node.pid

background 1
setsid 1

user root
group root

ignore_file [\#~]$
ignore_file DEADJOE$
ignore_file \.bak$
ignore_file %$
ignore_file \.dpkg-(tmp|new|old|dist)$
ignore_file \.rpm(save|new)$
ignore_file \.pod$


allow ^127\.0\.0\.1$           
allow ^192\.168\.8\.158$

host *
port 4949
bubuko.com,布布扣

 

3. 配置apache

rm  /etc/apache2/sites-enabled/* -rf
cp /etc/munin/apache.conf  /etc/apache2/sites-enabled/

4. 启动服务

/etc/init.d/munin start
/etc/init.d/munin-node start
/etc/init.d/apache2 restart

5. 修改定时执行

bubuko.com,布布扣
vim /etc/cron.d/munin                      #修改绘图周期
*/5 * * * * munin if [ -x /usr/bin/munin-cron ]; then /usr/bin/munin-cron; fi
/etc/init.d/cron restart                   #重启定时服务

vim /etc/munin/templates/partial/head.tmpl  #修改网页定时刷新

【<meta http-equiv="refresh" content="200" />
bubuko.com,布布扣

 

访问:     

http://192.168.8.158/munin/

 

 

参考:http://imcn.me/html/y2014/17433.html

  

ubuntu 下配置munin,布布扣,bubuko.com

ubuntu 下配置munin

标签:style   blog   class   code   c   java   

原文地址:http://www.cnblogs.com/javawer/p/3730255.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!