ganglia master install
1 | yum -y install ganglia ganglia-web ganglia-gmond ganglia-gmetad ganglia-devel ganglia-gmond-python pcp-import-ganglia2pcp nordugrid-arc-gangliarc libnodeupdown-backend-ganglia |
ganglia node install
1 | yum -y install ganglia-gmond |
ganglia 简介
1 | 与Cacti、Nagios、Zabbix等工具相比,Ganglia更关注整个集群的性能和可用性。可以用于集群的性能监控、分析和优化。 |
1 | 1.Gmetad程序: |
1 | 在动手部署Ganglia之前,首先要对监控体系进行初步的规划.主要考虑两方面的问题: |
ganglia 安装前选择
1
2
3选择多集群,单播模式:
server端: ganglia-web gmetad gmond
client端: gmond安装基础软件包
1
2
3[root@10 ~]# yum makecache
[root@10 ~]# yum -y install curl wget vim lrzsz net-tools dstat
[root@10 ~]# yum -y install libart_lgpl-devel gcc gcc-c++ python-devel libconfuse-devel expat-devel apr-devel pcre-devel rpm-build libconfuse libconfuse-devel rrdtool-perl rrdtool-develganglia master install
1
2
3
4
5
6
7[root@10 srv]# yum -y install ganglia ganglia-web ganglia-gmond-python ganglia-gmond ganglia-gmetad ganglia-devel
[root@10 ~]# mkdir -p /mnt/data
[root@10 ~]# cp -r /var/lib/ganglia /mnt/data/ganglia
[root@10 ~]# chown -R apache.apache /mnt/data/ganglia/conf
[root@10 ~]# chown -R apache.apache /mnt/data/ganglia/dwoo
[root@10 ~]# chown -R ganglia.ganglia /mnt/data/ganglia/rrds修改配置文件
1
2
3
4
5
6
7
8[root@10 ~]# vim /etc/ganglia/gmetad.conf
data_source "ssp" 10.0.2.15
gridname "ssp"
setuid_username ganglia
xml_port 8651
interactive_port 8652
rrd_rootdir "/mnt/data/ganglia/rrds"
case_sensitive_hostnames 01
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[root@10 ~]# vim /etc/ganglia/gmond.conf
globals {
daemonize = yes
setuid = yes
user = ganglia
debug_level = 0
max_udp_msg_len = 1472
mute = no
deaf = yes
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 = 30 /*secs */
}
cluster {
name = "ssp"
owner = "ssp"
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
host = 10.0.2.15
}
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
}
tcp_accept_channel {
port = 8649
# If you want to gzip XML output
gzip_output = yes
}1
2
3
4
5[root@10 ~]# vim /etc/ganglia/conf.php
<?php
$conf['gweb_confdir'] = "/mnt/data/ganglia";
$conf['gmetad_root'] = "/mnt/data/ganglia";
?>启动服务
1
2
3[root@10 ~]# systemctl start gmetad
[root@10 ~]# systemctl start gmond
[root@10 ~]# systemctl start httpd