【Munin】奥丁神的一只乌鸦的名字,代表记忆
OK, 非常简单的记录,也仅仅需要简单而已; 对于很多运维工程师而言,或许正在被Nagios羁绊,那么试试munin?
几年前看flickr官方运维说他们用这个才去看的, 当然他们也用ganglia
知晓的信息: 使用的平台是CentOS 5.6和Ubuntu 10.04 x64.
一. 最简单的架构无非是Master--Client Node+Plugins
在服务器上安装munin Server#yum install -y munin
描述信息: munin.noarch : Network-wide graphing framework (grapher/gatherer), 可以使用命令yum search munin查看类似的软件.
在客户端上安装munin-node Client#yum install -y munin-node
如果在Ubuntu平台上那么就是#apt-get install munin-node
非常不错的是这两个平台安装后默认都将配置文件放在/etc/munin目录下.
启动和关闭: #/etc/init.d/munin-node stop | start
配置文件很简单:
Server#vi /etc/munin/munin.conf
# Configfile for Munin master dbdir /var/lib/munin/ htmldir /var/www/munin/ logdir /var/log/munin rundir /var/run/munin/
tmpldir /etc/munin/templates
确认这些没有处于注释状态; 需要监控的节点请添加如下的描述:
[localhost] address 127.0.0.1 use_node_name yes [sha2web01] address 60.29.x.x use_node_name yes
这里【sha2web01】是我新加的node, 而且我没有做过多配置
在客户端配置:
Client## vi /etc/munin-node.conf
allow ^127\.0\.0\.1$ allow ^58\.246\.148\.44$
后面这行是我添加的,这个IP 58.246.148.44是服务端IP,我们需要让Client允许Server与此通讯.
# Which address to bind to; host * # host 127.0.0.1 # And which port port 4949 【端口你可以修改 成自己决定的端口,建议不改】
PS: 确认配置无误,确认防火墙没有不允许访问
测试:
Server#telnet ClientIP 4949
Trying ClientIP... Connected to CleintIP (ClientIP). Escape character is '^]'. # munin node at sha2web01
list
acpi apache_accesses apache_processes apache_volume cpu df df_inode entropy forks fw_conntrack
fw_forwarded_local fw_packets http_loadtime if_err_eth0 if_err_eth3 if_eth0 if_eth3 interrupts
iostat iostat_ios irqstats load memory mysql_slowqueries ntp_kernel_err ntp_kernel_pll_freq ntp_kernel_pll_off
ntp_offset open_files open_inodes postfix_mailqueue postfix_mailvolume proc_pri processes swap threads uptime users vmstat fetch apache_processes busy80.value U idle80.value U free80.value U .
# su - munin --shell=/bin/bash
$ls -al /usr/share/munin/ 【一些操作命令可在此目录下找到】
# munin-node-configure |more Plugin | Used | Extra information ------ | ---- | -----------------
cpu | yes | cpuspeed | no | cupsys_pages | no | df | yes |
apache_processes | yes |
Tags: munin