佳礼资讯网

 找回密码
 注册

ADVERTISEMENT

查看: 1670|回复: 4

Munin - 网络资源监控工具

[复制链接]
发表于 6-6-2013 11:38 AM | 显示全部楼层 |阅读模式
在这里做一个 munin 的安装教材。。。
我会用 ubuntu 12.04 LTS 服务器为基础。。。

1. 安装 apache 和 munin
  1. sudo apt-get update
  2. sudo apt-get install apache2
  3. sudo apt-get install munin munin-node
复制代码

2. 安装 munin 后,您可以从浏览器 http://127.0.0.1/munin 或 http://$hostname/IP$/munin 浏览 munin。但是,是被禁止的,因为 munin 只允许本地区域访问。您可以打开和编辑 /etc/munin/apache.conf的。

  1. sudo mcedit /etc/munin/apache.conf
复制代码

Allow from 127.0.0.1 ::1 换去 Allow from all

  1. Alias /munin /var/cache/munin/www
  2. <Directory /var/cache/munin/www>
  3.        Order allow,deny
  4. #      Allow from localhost 127.0.0.0/8 ::1
  5.        Allow from all
  6.        Options None
  7. # This file can be used as a .htaccess file, or a part of your apache
  8. # config file.
  9. #
  10. # For the .htaccess file option to work the munin www directory
  11. # (/var/cache/munin/www) must have "AllowOverride all" or something
  12. # close to that set.
  13. #
  14. #      AuthUserFile /etc/munin/munin-htpasswd
  15. #      AuthName "Munin"
  16. #      AuthType Basic
  17. #      require valid-user
  18. # This next part requires mod_expires to be enabled.
  19. #
  20. # Set the default expiration time for files to 5 minutes 10 seconds from
  21. # their creation (modification) time. There are probably new files by
  22. # that time.
  23. #
  24.       <IfModule mod_expires.c>
  25.              ExpiresActive On
  26.              ExpiresDefault M310
  27.       </IfModule>
  28. </Directory>

复制代码
3. 几分钟后,你的数据图表将会出现在 munin 的网页里。



本帖最后由 hata_ph 于 6-6-2013 12:20 PM 编辑

回复

使用道具 举报


ADVERTISEMENT

 楼主| 发表于 6-6-2013 11:50 AM | 显示全部楼层
安装 munin 客户版本 (ubuntu 服务器)

1. 安装 munin 客户版本到您的客户端服务器
  1. sudo apt-get install munin-node # for debian/ubuntu
复制代码
2. 在您的客户端,编辑 /etc/munin/munin-node.conf。添加以下面的文字。
  1. allow 192.168.122.201   # IP address of the central server
复制代码
3. 重开你的 munin-node
  1. sudo service munin-node restart
复制代码
4. 在 munin 服务器中,添加以下的脚本到 /etc/munin/munin.conf 或 创建 /etc/munin/munin-conf.d/node1.conf。
  1. [node1.mydomain.com] # hostname
  2.     address xxx.xxx.xxx.xxx # IP of your client
  3.     use_node_name yes
复制代码
重新启动 munin
  1. sudo service munin restart
复制代码
5. 几分钟后,你 munin 客户的数据图表将会出现在 munin 的网页里。


本帖最后由 hata_ph 于 6-6-2013 12:15 PM 编辑

回复

使用道具 举报

 楼主| 发表于 6-6-2013 12:05 PM | 显示全部楼层
密码保护 munin 网页界面

1. 为了密码保护 munin 的网页界面,编辑 /etc/munin/apache.conf:
  1. sudo mcedit /etc/munin/apache.conf
复制代码
  1. Alias /munin /var/cache/munin/www
  2. <Directory /var/cache/munin/www>
  3.        Order allow,deny
  4. #      Allow from localhost 127.0.0.0/8 ::1
  5.        Allow from all
  6.        Options None
  7. #      This file can be used as a .htaccess file, or a part of your apache
  8. #      config file.
  9. #
  10. #      For the .htaccess file option to work the munin www directory
  11. #      (/var/cache/munin/www) must have "AllowOverride all" or something
  12. #      close to that set.
  13. #
  14.        AllowOverride None
  15.        AuthUserFile /etc/munin/munin-htpasswd
  16.        AuthName "Munin"
  17.        AuthType Basic
  18.        require valid-user
  19. #      This next part requires mod_expires to be enabled.
  20. #
  21. #      Set the default expiration time for files to 5 minutes 10 seconds from
  22. #      their creation (modification) time. There are probably new files by
  23. #      that time.
  24. #
  25.       <IfModule mod_expires.c>
  26.                ExpiresActive On
  27.                ExpiresDefault M310
  28.       </IfModule>
  29. </Directory>
复制代码
2. 您必须制造 munin 的密码。在这种情况下,我们要登录的用户名是 Munin,运行以下命令:
  1. sudo htpasswd -c /etc/munin/munin-htpasswd Munin
复制代码
输入 Munin 的密码,重新启动 apache 和 munin,你就大功告成了!
  1. sudo service apache2 restart
  2. sudo service munin-node restart
复制代码
4. 在浏览器中打开穆宁网页


http://ubuntuserverguide.com/201 ... u-server-12-04.html

本帖最后由 hata_ph 于 6-6-2013 12:08 PM 编辑

回复

使用道具 举报

发表于 7-6-2013 01:50 PM | 显示全部楼层
munin 有沒有小圖表 或 tray icon 可以顯示 download 和 upload speed?

回复

使用道具 举报

 楼主| 发表于 7-6-2013 01:54 PM | 显示全部楼层
munin 是用来 monitor network device 和 server 的。。。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

 

ADVERTISEMENT



ADVERTISEMENT



ADVERTISEMENT

ADVERTISEMENT


版权所有 © 1996-2023 Cari Internet Sdn Bhd (483575-W)|IPSERVERONE 提供云主机|广告刊登|关于我们|私隐权|免控|投诉|联络|脸书|佳礼资讯网

GMT+8, 20-9-2024 09:57 PM , Processed in 0.126221 second(s), 27 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表