Ganglia配置安装

1、环境

ubuntu14.04操作系统


2、在 Ubuntu14.04 上安装 Ganglia 。

打开终端(Ctrl+Alt+T),输入以下命令:

sudo apt-get install ganglia-monitor rrdtool gmetad ganglia-webfrontend 

开始的时候,我的电脑不能正常安装,报了一些错误,后来我根据终端上给出的建议,运行了如下命令:

sudo apt-get update 

运行该命令后再运行上述命令:
sudo apt-get install ganglia-monitor rrdtool gmetad ganglia-webfrontend 

这时候发现可以正常下载,过程中可能会出现要求apache2重启的图形对话框,直接选择yes即可(原谅我忘了截图……)

终端截图:


3、配置 Ganglia

(1)复制 Ganglia webfrontend Apache 配置:

sudo cp /etc/ganglia-webfrontend/apache.conf /etc/apache2/sites-enabled/ganglia.conf 

(2)编辑 Ganglia 元守护程序的配置文件:

sudo vi /etc/ganglia/gmetad.conf

找到data_source "my cluster" localhost
修改为:data_source "my cluster" 50 192.168.56.10:8649 

(3)编辑主节点的配置文件:

sudo vi /etc/ganglia/gmond.conf 

并做如下变化:

/* If a cluster attribute is specified, then all gmond hosts are wrapped inside 
* of a tag. If you do not specify a cluster tag, then all will 
* NOT be wrapped inside of a tag. */ 
cluster { 
name = "unspecified" 
owner = "unspecified" 
latlong = "unspecified" 
url = "unspecified" 

修改为: 

cluster { 
name = "my cluster" 
owner = "unspecified" 
latlong = "unspecified" 
url = "unspecified" 

/* Feel free to specify as many udp_send_channels as you like. Gmond 
used to only support having a single channel */ 
udp_send_channel { 
mcast_join = 239.2.11.71 
port = 8649 
ttl = 1 

修改为: 

/* Feel free to specify as many udp_send_channels as you like. Gmond 
used to only support having a single channel */ 
udp_send_channel { 
# mcast_join = 239.2.11.71 
host = 192.168.56.10 
port = 8649 
ttl = 1 

/* You can specify as many udp_recv_channels as you like as well. */ 
udp_recv_channel { 
mcast_join = 239.2.11.71 
port = 8649 
bind = 239.2.11.71 

修改为: 

/* You can specify as many udp_recv_channels as you like as well. */ 
udp_recv_channel { 
# mcast_join = 239.2.11.71 
port = 8649 
#bind = 239.2.11.71 
}

(4)保存并关闭文件

在vi编辑器中,使用vi命令打开编辑器后,输入i即可插入文本,当需要保存推出时可以先按Esc键,然后输入:wq!,回车即可(具体使用方法详见vi编辑器使用方法)


4、重启服务:

sudo /etc/init.d/ganglia-monitor start 
sudo /etc/init.d/gmetad start 
sudo /etc/init.d/apache2 restart 


5、访问gnglia webinterface

至此,Ganglia的安装配置完成,登录特定网页即可看到监控信息。

访问网址:http://localhost/ganglia/,得到下图所示页面:


至此,Ganglia安装大功告成!

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值