在部署gmond时, 有几个需要注意的地方.
1. 反向hostname解析
因为gmond 在收到来自其他gmond的包时, 需要将源地址解析成主机名, 如果突发的量比较大, 或者DNS服务器比较慢的话, 可能导致gmond处理变慢. (If the lookups must
be handled by DNS, this can slow down the process. As it is a single-threaded design,
this scenario can have undesirable consequences.)
所以作为mute角色的gmond, 最好配置/etc/hosts, 保存网络中所有其他gmond的IP和主机名. 省去从dns解析源IP的麻烦.
例如 :
2. 时钟同步
[参考]
# vi /etc/hosts
172.16.3.221 db-172-16-3-221.sky-mobi.com
172.16.3.150 db-150.sky-mobi.com
172.16.3.151 db-151.sky-mobi.com
172.16.3.152 db-152.sky-mobi.com
172.16.3.153 db-153.sky-mobi.com
172.16.3.154 db-154.sky-mobi.com
......
2. 时钟同步
It is essential that all hosts participating in the Ganglia monitoring system have a
synchronized clock. Proactively deploying network time protocol (NTP) is highly
recommended.
If you see a message similar to the following in your web server logs, it is highly likely
that the hosts running gmond are not time-synced:
alleviateFeb 22 05:33:22 localhost.localdomain /usr/sbin/gmetad[2782]:
RRD_update (/var/lib/ganglia/rrds/...metric.rrd): illegal attempt to
update using time 1329950002 when last update time is 1329950002
(minimum one second step)
3. selinux和防火墙
Ganglia daemons communicate with each other via network (TCP/UDP) sockets.
The
web frontend also needs to communicate with gmetad via the interactive port.
If a
firewall needs to be in place on servers running the Ganglia services, please ensure that
the ports are opened on the firewall.
Default ports are 8649 for gmond, 8651 for gmetad
noninteractive, and 8652 for gmetad interactive.