Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1380479
  • 博文数量: 77
  • 博客积分: 2104
  • 博客等级: 大尉
  • 技术积分: 2322
  • 用 户 组: 普通用户
  • 注册时间: 2008-03-19 13:21
个人简介

关注于系统高可用、网站架构

文章分类

全部博文(77)

文章存档

2018年(1)

2017年(1)

2015年(4)

2014年(8)

2013年(4)

2012年(12)

2011年(17)

2010年(30)

分类: HADOOP

2015-12-11 19:49:06

Ganglia包括如下程序,他们之间通过XML格式传递监控数据,达到监控效果。 
Gmetad 这个程序负责收集各个cluster的数据,并更新到rrd数据库中。 
Gmond 收集本机的监控数据,发送到其他机器上。收集其他机器的监控数据,供Gmetad读取。默认监听端口8649 
web front-end 一个基于web的监控界面,需要和Gmetad安装在同一个节点上,从Gmetad取数据,并且读取rrd数据库,生成图片,显示出来。 
一、Ganglia的工作模式
Ganglia的收集数据工作可以工作在单播(unicast)或多播(multicast)模式下,默认为多播模式。 
单播:发送自己收集到的监控数据到特定的一台或几台机器上,可以跨网段 
多播:发送自己收集到的监控数据到同一网段内所有的机器上,同时收集同一网段内的所有机器发送过来的监控数据。因为是以广播包的形式发送,因此需要同一网段内。但同一网段内,又可以定义不同的发送通道。
二、Ganglia的安装
Ganglia的安装非常简单,分为监控管理端(Gmetad)和客户端(Gmond)安装两部分
所有服务器安装好epel 源
服务端
yum install ganglia* -y
客户端
yum install ganglia-gmond -y

三、Ganglia的配置
1、监控管理端
/etc/ganglia/gmetad.conf 
所有集群的统称 
增加一项 gridname "BIGDATA"
增加data_source
data_source "hadoop" ip:port
修改rrd路径,否则根分区容易满
rrd_rootdir "/some/other/place"
http服务修改 vi /etc/httpd/conf.d/ganglia.conf 
增加 Allow from all

2、客户端配置
客户端监控安装完成后,配置文件位于安装Ganglia的etc目录下,名称为gmond.conf:
主要修改如下几项
cluster {
name = "hadoop"  #本节点属于哪个cluster 
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=ip    #如果使用单播模式,则要写host = host1,单播模式下也可以配置多个udp_send_channel
  port = 8654
  ttl = 1
}
取消多播,修改端口
 udp_recv_channel {     #接收udp包配置
  #mcast_join = 239.2.11.71
  port = 8654
  #bind = 239.2.11.71
修改端口
tcp_accept_channel {
  port = 8654            #通过tcp协议监听的端口,远端可以通过链接8649端口得到监控数据

 
五、管理ganglia
 
所有配置操作完成后,即可启动ganglia服务了,首先在监控管理端启动gmetad服务:
/etc/init.d/gmetad start
接着启动apache的web服务:
/etc/init.d/httpd start
最后在每个客户端启动gmond服务:
/etc/init.d/gmond start

访问方式     
阅读(3964) | 评论(1) | 转发(0) |
给主人留下些什么吧!~~

nxpdxgpi2015-12-22 23:58:56

<a href=\"http://blog.chinaunix.net/uid-25057421-id-5576282.html\" target=\"_blank\">http://blog.chinaunix.net/uid-25057421-id-5576282.html</a>淄博装修城市人家 家居风水禁忌与化解方法打屁股打屁股<p align=\"center\">招财聚宝盆貔貅摆件大号一对 工艺品家居<a href=\"http://www.6ju.com/fengshui/\" target=\"_blank\">风水</a><a href=\"http://www.6ju.com/ruanzhuang/\" target=\"_blank\">软装</a>品摆设 开业礼品&nb<a href=\"http://www.www.mantuosp.com/\" target=\"_blan