在 Ubuntu 14.04 Server 上安装 Ganglia

关于 Ganglia 软件,Ganglia是一个跨平台可扩展的,高性能计算系统下的分布式监控系统,如集群和网格。它是基于分层设计,它使用广泛的技术,如XML数据代表,便携数据传输,RRDtool用于数据存储和可视化。它利用精心设计的数据结构和算法实现每节点间并发非常低的。

它已移植到广泛的操作系统和处理器架构上,目前在世界各地成千上万的集群正在使用。它已 被用来连结大学校园和世界各地,可以处理2000节点的规模。

好,准备安装!

1、首先,需要确保在 Ubuntu14.04 上安装了 LAMP 服务。

Ganglia 由两个所谓主要守护进程 gmond(Ganglia 监测守护进程)和 gmetad(Ganglia 元守护进程),一个基于 PHP 的 Web 前端和其他一些小的实用程序。

2、在 Ubuntu14.04 上安装 Ganglia 。

打开终端,运行以下命令:

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

在安装过程中,你应该会看到类似下面的安装后与apache2服务器重启选择,直接 Yes,然后按Enter键。

15

3、配置 Ganglia

已经完成了基本的安装,现在我们按照下面必要的步骤来配置

4、Ganglia 主节点配置

现在,你需要复制 Ganglia webfrontend Apache 配置,使用下面的命令来正确的位置:

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

现在,您需要使用以下命令来编辑 Ganglia 元守护程序的配置文件:

sudo vi /etc/ganglia/gmetad.conf

更改如下:

data_source "my cluster" localhost

修改为:

data_source "my cluster" 50 192.168.56.10:8649

下面列出机器服务的数据源,IP:端口或服务器名称:端口。如果未指定端口号8649(默认gmond端口)。
需要使用下面的命令编辑主节点的配置文件:

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
}

保存并关闭文件。

需要重启服务:

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

现在你可以使用以下命令访问gnglia webinterface:

http://serverip/ganglia/

ganglia02

5、ganglia 客户端安装
你需要安装以下所有服务器要监视客户端包

sudo apt-get install ganglia-monitor

6、ganglia 客户端配置
你需要使用下面的命令编辑gmond.conf文件

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
#}

保存并退出。

重启 ganglia monitor 服务

sudo /etc/init.d/ganglia-monitor restart

OK,搞定!

投稿作者 作者网站

评论

 
 

发表评论

 
你的昵称*
电子邮件*
网址(选填)
我的评论*
  • 发表评论
  • 为您推荐


    请支持IMCN发展!

    谁在捐赠

    微信捐赠 支付宝捐赠
    微信捐赠 支付宝捐赠
    ta的个人站点

    发表文章4156篇

    关注我的头条 不要放弃,百折不挠,坚强、自信。





    微信公众号二维码

    归档