一. 安装Ganglia

1. 安装httpd服务与php

sudo yum -y install httpd php

2. 安装其他依赖

sudo yum -y install rrdtool perl-rrdtool rrdtool-devel

sudo yum -y install apr-devel

3. 安装ganglia

sudo rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

sudo yum -y install ganglia-gmetad 

sudo yum -y install ganglia-web

sudo yum install -y ganglia-gmond

Ganglia由gmond、gmetad和gweb三部分组成。

gmond(Ganglia Monitoring Daemon)是一种轻量级服务,安装在每台需要收集指标数据的节点主机上。使用gmond,你可以很容易收集很多系统指标数据,如CPU、内存、磁盘、网络和活跃进程的数据等。

gmetad(Ganglia Meta Daemon)整合所有信息,并将其以RRD格式存储至磁盘的服务。

gweb(Ganglia Web)Ganglia可视化工具,gweb是一种利用浏览器显示gmetad所存储数据的PHP前端。在Web界面中以图表方式展现集群的运行状态下收集的多种不同指标数据。

4. 修改配置文件

sudo vim /etc/httpd/conf.d/ganglia.conf
#修改为
# Ganglia monitoring system php web frontend
Alias /ganglia /usr/share/ganglia
<Location /ganglia>
Order deny,allow
#Deny from all
Allow from all
# Allow from 127.0.0.1
# Allow from ::1
# Allow from .example.com
</Location>
sudo vim /etc/ganglia/gmetad.conf
#修改为
data_source "hadoop100" 192.168.1.100
sudo vim /etc/ganglia/gmond.conf
#修改为
cluster {
name = "hadoop100"
owner = "unspecified"
latlong = "unspecified"
url = "unspecified"
}
udp_send_channel {
#bind_hostname = yes # Highly recommended, soon to be default.
# This option tells gmond to use a source address
# that resolves to the machine's hostname. Without
# this, the metrics may appear to come from any
# interface and the DNS names associated with
# those IPs will be used to create the RRDs.
# mcast_join = 239.2.11.71
host = 192.168.1.100
port =
ttl =
}
udp_recv_channel {
# mcast_join = 239.2.11.71
port =
bind = 192.168.1.100
retry_bind = true
# Size of the UDP buffer. If you are handling lots of metrics you really
# should bump it up to e.g. 10MB or even higher.
# buffer =
}
sudo vim /etc/selinux/config
#修改为
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of these two values:
# targeted - Targeted processes are protected,
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
#脱裤提醒 : selinux本次生效关闭必须重启,如果此时不想重启,可以临时生效之:
sudo setenforce

5. 启动ganglia

sudo service httpd start

sudo service gmetad start

sudo service gmond start

6. 打开ganglia浏览页面

http://192.168.1.100/ganglia

脱裤提示:如果完成以上操作依然出现权限不足错误,请修改/var/lib/ganglia目录的权限:
sudo chmod -R /var/lib/ganglia

二. 操作Flume测试监控

1. 修改配置文件

#修改/opt/module/flume/conf目录下的flume-env.sh配置:
JAVA_OPTS="-Dflume.monitoring.type=ganglia
-Dflume.monitoring.hosts=192.168.1.100:
-Xms100m
-Xmx200m"

2. 启动Flume任务

bin/flume-ng agent
--conf conf/--name a1
--conf-file jobs/flume-netcat-logger.conf
-Dflume.root.logger==INFO,console
-Dflume.monitoring.type=ganglia
-Dflume.monitoring.hosts=192.168.1.100:

3. 发送数据观察ganglia监测图

nc localhost 

图例说明:

字段(图表名称)

字段含义

EventPutAttemptCount

source尝试写入channel的事件总数量

EventPutSuccessCount

成功写入channel且提交的事件总数量

EventTakeAttemptCount

sink尝试从channel拉取事件的总数量。这不意味着每次事件都被返回,因为sink拉取的时候channel可能没有任何数据。

EventTakeSuccessCount

sink成功读取的事件的总数量

StartTime

channel启动的时间(毫秒)

StopTime

channel停止的时间(毫秒)

ChannelSize

目前channel中事件的总数量

ChannelFillPercentage

channel占用百分比

ChannelCapacity

channel的容量

Flume(5)-Ganglia监控的更多相关文章

  1. Flume案例Ganglia监控

    Flume案例和Flume监控系统的使用: 安装 将apache-flume-1.7.0-bin.tar.gz上传到linux的/opt/software目录下 解压apache-flume-1.7. ...

  2. Hadoop生态圈-使用Ganglia监控flume中间件

    Hadoop生态圈-使用Ganglia监控flume中间件 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 一.Ganglia监控简介 加州伯克利大学千禧计划的其中一个开源项目.是一 ...

  3. 使用ganglia监控hadoop及hbase集群

    一.Ganglia简介 Ganglia 是 UC Berkeley 发起的一个开源监视项目,设计用于测量数以千计的节点.每台计算机都运行一个收集和发送度量数据(如处理器速度.内存使用量等)的名为 gm ...

  4. Ganglia监控Hadoop集群的安装部署[转]

    Ganglia监控Hadoop集群的安装部署 一. 安装环境 Ubuntu server 12.04 安装gmetad的机器:192.168.52.105 安装gmond的机 器:192.168.52 ...

  5. ganglia监控hadoop2.0配置方法

    ganglia监控hadoop2.0配置方法前提:hadoop2.0集群已安装ganglia监控工具第一步:Hadoop用户登录集群每一个节点,修改文件:vi /opt/hadoop-2.0.0-cd ...

  6. Ganglia监控搭建

    一.Ganglia介绍: Ganglia是一个监控服务器.集群的开源软件,能够用曲线图表现最近一个小时,最近一天,最近一周,最近一月,最近一年的服务器或者集群的cpu负载,内存,网络,硬盘等指标.Ga ...

  7. Ganglia 监控Hadoop

    Ganglia监控Hadoop集群的安装部署 一. 安装环境 Ubuntu server 12.04 安装gmetad的机器:192.168.52.105 安装gmond的机 器:192.168.52 ...

  8. Ganglia监控扩展实现机制

    Ganglia监控扩展实现机制 默认安装完成的Ganglia仅向我们提供基础的系统监控信息,通过Ganglia插件可以实现两种扩展Ganglia监控功能的方法.1.添加带内(in-band)插件,主要 ...

  9. Ganglia监控Hadoop集群的安装部署

    一. 安装环境 Ubuntu server 12.04 安装gmetad的机器:192.168.52.105 安装gmond的机器:192.168.52.31,192.168.52.32,192.16 ...

随机推荐

  1. new era

    新的博客,将会记录我在工作和学习中遇到的问题以及总结...

  2. ORACLE 数据找回

    -- 找回一个小时前的数据 select * from sys_system_dictionary as of timestamp sysdate - 1/24order by id AS OF TI ...

  3. Python学习---Model拾遗[2]180318

    Model的字段及字段参数: Model字段: 数字        字符串(带正则的字段)        时间        文件       特殊字段:(一对一,一对多,多对多) Models.py ...

  4. VS无法加载Web项目

    在VS中修改Web项目的服务器设置时无法加载改Web项目,提示如下图 原因:因为项目中的EbcBuy.Bll.Users.WebApi.csproj.user文件并没有加入到版本控制文件,所以讲项目还 ...

  5. 计算机作业(HTML简单框架网页制作) 物联网 王罗红

  6. matlab 波纹扭曲

    % 波纹扭曲 img=imread('pic.jpg'); img=im2double(img); [h,w,c]=size(img); ratio=600/(h+w); img=imresize(i ...

  7. Asp.Net MVC Identity 2.2.1 使用技巧(七)

    创建角色管理相关视图 1.添加视图 打开RolesAdminController.cs   将鼠标移动到public ActionResult Index()上  右键>添加视图   系统会弹出 ...

  8. codeforces 497E Subsequences Return

    codeforces 497E Subsequences Return 想法 做完这题,学了一些东西. 1.求一个串不同子序列个数的两种方法.解一 解二 2.这道题 \(n\) 很大,很容易想到矩阵加 ...

  9. 编程题A+B Format的总结(第二次作业<一>)

    Github链接地址:https://github.com/Startup-try/object-oriented 这个题目现在想想没有那么难,其实还挺简单的,但是中午花了好长的时间还不懂得怎么做,感 ...

  10. angularJs的工具方法2

    一.angular.isArray     判断是否是数组 var a = []; console.log(angular.isArray(a)); //判断参数里面的是否是数组 二.angular. ...