Ganglia:分布式监控系统
Ganglia:分布式监控系统
Ganglia的核心包含gmond、gmetad以及一个Web前端。主要是用来监控系统性能,如:cpu 、mem、硬盘利用率, I/O负载、网络流量情况等,通过曲线很容易见到每个节点的工作状态,对合理调整、分配系统资源,提高系统整体性能起到重要作用
Ganglia监控端安装
1、安装依赖的软件包
1
|
yum install ntp vim-enhanced gcc gcc-c++ flex bison autoconf automake bzip2 -devel ncurses-devel zlib-devel libjpeg-devel libpng-devel libtiff-devel freetype-devel libXpm-devel gettext-devel pam-devel python-devel perl perl-devel expat expat-devel pcre pcre-devel apr apr-devel cairo-devel和pango-devel
|
需要安装rrdtool工具 最新版本的ganglia已可以直接使用yum安装rrdtool工具即可,
2、安装confuse
1
2
3
4
5
|
wget http: //download .savannah.gnu.org /releases/confuse/confuse-2 .7. tar .gz
tar zxf confuse-2.7. tar .gz
cd confuse-2.7
. /configure CFLAGS=-fPIC --disable-nls ; make ; make install
cd ..
|
3、安装ganglia
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
wget http: //downloads .sourceforge.net /project/ganglia/ganglia %20monitoring%20core /3 .3.1 /ganglia-3 .3.1. tar .gz
tar zxf ganglia-3.3.1. tar .gz
cd ganglia-3.3.1
#server 监控端
. /configure --prefix= /usr/local/ganglia --with-static-modules -- enable -gexec -- enable -status --with-gmetad --with-python= /usr --with-librrd= /usr/local/rrdtool --with-libexpat= /usr --with-libconfuse= /usr/local --with-libpcre
make
make install
cd gmetad
cp gmetad.conf /opt/modules/ganglia/etc/
cp gmetad.init /etc/init .d /gmetad
vim /etc/init .d /gmetad
修改为GMETAD= /usr/local/ganglia/sbin/gmetad
ip route add 239.2.11.71 dev eth0 ##添加广播路由
|
Ganglia:被监控端安装:
1、安装依赖的软件包
1
|
yum install ntp vim-enhanced gcc gcc-c++ flex bison autoconf automake bzip2 -devel ncurses-devel zlib-devel libjpeg-devel libpng-devel libtiff-devel freetype-devel libXpm-devel gettext-devel pam-devel python-devel perl perl-devel expat expat-devel pcre pcre-devel apr apr-devel
|
1
2
3
4
5
|
wget http: //download .savannah.gnu.org /releases/confuse/confuse-2 .7. tar .gz
tar zxf confuse-2.7. tar .gz
cd confuse-2.7
. /configure CFLAGS=-fPIC --disable-nls ; make ; make install
cd ..
|
2、安装ganglia
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
wget http: //downloads .sourceforge.net /project/ganglia/ganglia %20monitoring%20core /3 .3.1 /ganglia-3 .6.0. tar .gz
tar zxf ganglia-3.6.0. tar .gz
cd ganglia-3.6.0
. /configure --prefix= /usr/local/ganglia -- enable -gexec -- enable -status --with-python= /usr --with-libapr --with-libconfuse= /usr/local --with-libexpat= /usr --with-libpcre
make
make install
cd gmond
. /gmond -t > /usr/local/ganglia/etc/gmond .conf
cp gmetad.init /etc/init .d /gmond
vim /etc/init .d /gmond
修改为:
GMETAD= /usr/local/ganglia/sbin/gmond
mkdir /usr/local/ganglia/lib64/ganglia/python_modules
cp python_modules/*/*.py /usr/local/ganglia/lib64/ganglia/python_modules
ip route add 239.2.11.71 dev eth0
|
安装已完成,过程简单。
Web网页页面在https://github.com/ganglia/ganglia-web
自行下载配置使用即可。
下面来监控,使其能正常工作和使用。
ganglia是分布式监控系统,也可以不使用分布来用。下面就分两种方式来解说。
1、不使用分布式来监控的方式
1
2
3
4
5
6
7
8
9
10
11
12
|
服务器配置文件
修改两项:
data_source "test1" 192.168.107.2
data_source "test2" 172.16.1.4
##这里分了两个监控组
data_source是关键字,
“test1,test2” 是监控主机组的名字,全局要唯一。 后面跟着要监控的ip或主机名,如果有多个可以用空格隔开就可以了
gridname "Test"
这个是定义监控集的名字,
|
如下所示:
现在ganglia还没有启动,在启动之前执行下面命令:
可以使用命令查看是不是有配置错误的地方导致启动不了
/usr/local/ganglia/sbin/gmetad -d 5
出错的地方应该可以修改配置文件gmetad.conf得到修正、
service gmetad start 来启动服务
好了,再看客户端的配置吧
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
在客户端配置
globals {
daemonize = yes
setuid = yes
user = nobody
debug_level = 0
max_udp_msg_len = 1472
mute = no
deaf = no
allow_extra_data = yes
host_dmax = 86400 /*secs. Expires (removes from web interface) hosts in 1 day */
host_tmax = 20 /*secs */
cleanup_threshold = 300 /*secs */
gexec = no
# By default gmond will use reverse DNS resolution when displaying your hostname
# Uncommeting following value will override that value.
# override_hostname = "mywebserver.domain.com"
# If you are not using multicast this value should be set to something other than 0.
# Otherwise if you restart aggregator gmond you will get empty graphs. 60 seconds is reasonable
send_metadata_interval = 0 /*secs */
}
cluster {
name = "test1" ####需要修改与服务器端设定相同的名字 ###
owner = "nobody" ###修改为nobody
latlong = "unspecified"
url = "unspecified"
}
host {
location = "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 ##与设定的要一样哦
port = 8649 ##默认端口
ttl = 1
}
udp_recv_channel {
mcast_join = 239.2.11.71 ##与设定的要一样哦
port = 8649 ##默认端口
bind = 239.2.11.71
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 = 10485760
}
/* You can specify as many tcp_accept_channels as you like to share
an xml description of the state of the cluster */
tcp_accept_channel {
port = 8649
# If you want to gzip XML output
gzip_output = no
}
|
启动客户端
在客户端也是可以使用debug来调试配置是不是有错
/usr/local/ganglia/sbin/gmond -d 5
service gmond start
下面来说第2种分布式监控系统
2、分布式监控
主gmetad 多个次gmetad 被监控点
|------ gmond
_ gmetad---|------ gmond
| |------ gmond
|
gmetad-------|_ gmetad---|-------gmond
| | |------gmond
| |__ gmetad----|------gmond
| |------gmond
|_gmond
|-gmond
从面可以看到多个gmetad点和多个gmond点
主要是从次节点的配置:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
下面对次节点配置如下
gmetad.conf
配置如下:
data_source "test2" localhost ip /hostname
gmond.conf配置文件如下:
cluster {
name = "test2"
owner = "nobody"
latlong = "unspecified"
url = "unspecified"
}
host {
location = "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 = 172.16.1.4 ####次节点的ip地址。也就次节点自己的ip地址
port = 8649
}
udp_recv_channel {
port = 8649
family = inet4
}
/* You can specify as many tcp_accept_channels as you like to share
an xml description of the state of the cluster */
tcp_accept_channel {
port = 8649
}
|
次节点下的gmond节点配置与次节点gmond的配置一样,直接copy一份到gmond上面就好。
关于Ganglia的主要配置到此为止了。Ganglia的views功能还在研究当中,不过这个view添加很麻烦,我配置的好久也,只是在配置文件中添加,在页面上没有添加成功,因为页面上没有添加view的功能,,这个很不爽,网上查了很多资料,只是在官网上找到一点相关E文,,,,,,希路过的大牛能指点一二,多谢!
本文转自 ZhouLS 51CTO博客,原文链接:http://blog.51cto.com/zhou123/1543105
Ganglia:分布式监控系统相关推荐
- 普罗米修斯 监控_完美的分布式监控系统——普罗米修斯
DevOps工程师或SRE工程师,可能都知道Prometheus普罗米修斯.Prometheus于2012年由SoundCloud创建,目前已经已发展为最热门的分布式监控系统.Prometheus完全 ...
- 分布式监控系统Zabbix3.2对数据库的连接数预警
在前篇分布式监控系统Zabbix3.2监控数据库的连接数 中已经对数据库的端口3306进行了监控,可以看到数据库的连接数历史变化有高有低,那如果达到了数据库连接数的阀值是不是主动通知给运维人员去检查问 ...
- 华为吴晟:分布式监控系统的设计与实现
微服务架构其实就是将单一的应用程序划分成为一组小的服务,其中每个服务都是独立的业务单元,同时又能够被独立开发.运行.测试以及部署.简单来说,它的本质其实就是拆分和独立,这也决定了微服务的部署应该是分布 ...
- 分布式监控系统Zabbix3.2监控数据库的连接数
在 分布式监控系统Zabbix3.2跳坑指南 和 分布式监控系统Zabbix3.2给异常添加邮件报警 已经介绍了如何安装以及报警.此篇通过介绍监控数据库的3306端口连接数来了解如何监控其它端口和配置 ...
- skywalking 安装_分布式监控系统SkyWalking
分布式监控系统SkyWalking 公司微服务架构用了有些时间了,微服务架构下的链接调用问题也越来越明显.人员流失,架构改造等原因,想人工维护架构图是不大可能了.常见的APM工具有cat.zipkin ...
- grafana+zabbix 部署分布式监控系统
环境 :Ubuntu 16.04 1.安装grafana $ wget https://s3-us-west-2.amazonaws.com/grafana-releases/release/graf ...
- 基于fastdfs-zyc搭建分布式监控系统
基于中标麒麟操作系统搭建fastdfs-zyc分布式监控系统 1. 简介 2. 系统环境要求 3. 环境部署,直接上代码 4. 安装tomcat,jdk这步省略,可以自己百度Centos7安装tomc ...
- arduino读取水位传感器的数据显示在基于i2c的1602a上_基于PC-CAN适配卡和总线技术实现潜水电机分布式监控系统的应用方案...
目前,国内外已有多家公司开发出针对个体潜水电机的智能电了保护装置,虽然可以达到保护电机的目的,但无法实现集中管理.因此,对潜水电机群的实时监控与统一管理的要求日益迫切.本文设计了基于CAN现场总线的潜 ...
- 打造云原生大型分布式监控系统(三): Thanos 部署与实践
视频 附上本系列完整视频 打造云原生大型分布式监控系统(一): 大规模场景下 Prometheus 的优化手段 打造云原生大型分布式监控系统(一): 大规模场景下 Prometheus 的优化手段_哔 ...
最新文章
- iOS 获取Assets中的启动页
- 使用CSS更改HTML5输入的占位符颜色
- FROONT – 超棒的可视化响应式网页设计工具
- python装饰器模式带参数_Python装饰器使用实例:验证参数合法性 请教Python 使用装饰器实现单例模式的原理...
- 华为鸿蒙战略布局,继5G与鸿蒙后又一重要布局:华为发布计算战略
- NIS认证管理域中的用户
- 无锡东亭计算机培训班,锡山区东亭办公自动化培训、电脑培训班有哪些?
- [转载] java构造函数初始化与执行顺序问题
- [bzoj5301][Cqoi2018]异或序列
- HDU1556 color the ball(前缀和)
- 大话中国骨干网(上)(转)
- 机器学习与分布式机器学习_机器学习-什么是机器学习?
- 管理:重要性影响力方格
- 计算机专业游戏留学,启程:一个游戏专业留学生的第一周
- Android学习笔记七之ContentProvider
- Excel图表—标准正态分布概率分布图(概率密度函数图及累积概率分布图)的绘制
- mulesoft 入门与实践-1
- 为什么选择MVVM而不是MVP - Android体系结构
- Python list 常见用法
- [深度学习] 自然语言处理 --- NLP入门指南
热门文章
- Jquery中怎样判断是否有网络
- Column 'Status' in where clause is ambiguous
- redis-数据类型与应用
- weblogic从入门到起飞(wlst)(四)
- 「博客之星」评选,诚信的互投啊,留链定回
- 华为云服务器 大文件,云服务器上传大文件
- python 跳一跳辅助_python实现跳一跳辅助的实验报告
- 新国货美妆品牌数字营销能力升级“三步法”
- 解锁营销自动化行为触发,神策数据《营销自动化应用基准报告 2021》助力企业增长
- PPT 下载 | 纷享销客刘晨:客户生命周期服务设计