安装centOS后,安装ganglia,一切顺利,但是启动 gmond -d 3 一直显示:
.... ....
metric 'dev-sda10-disk_used' has value_threshold 1.000000
sent message 'tcp_established' of length 56 with 0 errors
.... ....
gmetad -d 3 一直显示:is a 2.5 or later data stream
[charis] is a 2.5 or later data stream
[charis] is a 2.5 or later data stream
[charis] is a 2.5 or later data stream
没有任何报错,上网查连资料,只有同样到问题,没有找到解决方案;
着实苦了几个小时,重装高版本到ganglia问题依旧。telnet 8649 也是显示不出数据,仅有空到xml信息
今天特意重现现场,避免重走弯路
问题原因:
iptalbe 没有放开限制;解决方法就不多说了:iptable中加入配置 ,后service iptables restart
-A INPUT -p udp -m state --state NEW -m udp --dport 8649 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 8649 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 8651 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 8652 -j ACCEPT
再次看gmond和gmetad到输出:
gmond的多了 processing ;说明收到广播消息了
saving metadata for metric: dev-sda10-disk_total host: 10.66.134.60
Processing a metric value message from 10.66.134.60
Processing a metric metadata message from 10.66.134.60
***Allocating metadata packet for host--10.66.134.60-- and metric --heartbeat-- ****
saving metadata for metric: heartbeat host: 10.66.134.60
Processing a metric value message from 10.66.134.60
Got a heartbeat message 1395227655
metric 'tcp_established' being collected now
metric 'tcp_established' has value_threshold 1.000000
metric 'tcp_listen' being collected now
metric 'tcp_listen' has value_threshold 1.000000
gmetad收到了消息:
Updating host 10.66.134.60, metric tcp_synsent
Updating host 10.66.134.60, metric swap_free
Writing Summary data for source charisma, metric dev-sdb4-disk_used
Writing Summary data for source charisma, metric dev-sda10-disk_total
Writing Summary data for source charisma, metric cpu_nice
问题搞定 ~