易陆发现互联网技术论坛

 找回密码
 开始注册
查看: 3990|回复: 2
收起左侧

ganglai采集数据

[复制链接]
发表于 2017-8-31 13:28:12 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?开始注册

x
ganglai采集数据3 P" M4 J7 {! _# ~5 D
需要配置ganglai的配置文件gmod.conf3 l0 }; c4 ?! m3 V6 _) D( N9 `! [
) a* [' Y7 r1 h& e
  deaf = no   #服务端配置no,客户端配置yes' ?" g5 Z, B+ |% B* m9 Z

: X. o4 S2 B) Q& n% E找到下面配置:客户端和服务端一样。
- R: z3 @1 s5 v   udp_send_channel {  #bind_hostname = yes # Highly recommended, soon to be default.( ^2 t& k. L# f3 v  a8 _4 B9 `4 n) D2 d
                       # This option tells gmond to use a source address% |; l/ q9 m& W9 `: N) d
                       # that resolves to the machine's hostname.  Without# r9 l2 t  k9 q! Q. h
                       # this, the metrics may appear to come from any
: z! [+ J# p0 R! f! k- ~" y! q0 B                       # interface and the DNS names associated with2 H) ]: u: g2 d6 P
                       # those IPs will be used to create the RRDs.- e9 f9 `0 f, L% H! J/ K
#  mcast_join = 239.2.11.714 E. H5 Y3 v6 }* c
  host = clm.ganglia.server5 d5 m# ]$ r) I) O9 B
  port = 8649( Y# ^2 n- @7 s. l: f, I
#  ttl = 1) Q; P* h# e6 V) d
}
- h# w, D# V# C0 i2 \1 p5 y9 v5 A) {1 T
重启gmod.service服务
$ _* R. {! o. h/ |% X, esystemctl restart gmod.service9 f" @4 F3 J) g  }! [/ {

' N# `" r, |& n. @- ]添加需要添加语句:2 U2 ~  W, C; G8 I  a8 M
   mysql> insert into`subnet_server_info_tab` (`SubnetId`, `RocksServerIP`, `RocksServerID`,`RocksServerPassword`, `GangliaServerIP`, `GangliaServerID`,`GangliaServerPassword`, `NagiosServerIP`, `NagiosServerID`,`NagiosServerPassword`, `AutoDetectFlag`, `LocalTable_ID_Ref`, `RocksLock`,`ganglia4bcec`) values('CIDC-R-01-IPSUB-00000323','','','','10.15.4.3','','','','','','','njpm','','');
6 V/ [& K) l7 n/ H/ f8 \
6 h: f& ]' E8 _9 [; \
Query OK, 1 row affected

5 F3 T) S- I5 ~1 l& |4 x) ]
CIDC-R-01-IPSUB-00000323  #系统中配置的网络段地址0 R4 a4 E' h; @" _$ H
   10.15.4.3 #为服务端的地址。$ R8 m: Q1 A% W9 y6 H, j: ~
接下来启动performance服务" X, T* H$ U4 ~
+ o0 U1 Q6 A7 v) u' j* p8 O
0 H6 Z: N5 n3 ~5 e$ M% b% u/ p8 P
9 ^: F0 Q2 M* f+ t( Y3 `, }  _

. j  k3 X6 x, ?# cd /apps/svr/PerformancePM5 x2 b$ S, W' N
#/apps/svr/PerformancePM/Performance/startup.sh+ z& e! E; X$ x" e
, R! M. k) x# ^: d9 |& _4 n
# ps -ef |grep performance
% V* C6 J5 c1 ]+ ~3 Y, L% \& K/ Y9 d5 o5 u+ ?* c' B9 t
 楼主| 发表于 2017-8-31 13:35:01 | 显示全部楼层
采集数据基本就可以使用了。要记得加iptables规则哦;* d7 \( H& U! p/ r
-A INPUT -p tcp -m tcp --dport 8649 -m comment --comment "ganglai" -j ACCEPT/ Q  H" C% z; A0 ^# V
-A INPUT -p udp --dport 8649 -j ACCEPT
 楼主| 发表于 2017-8-31 15:06:35 | 显示全部楼层
采集节点多的情况下可以使用脚本协助处理。或者ansible工具安装。
  ~& U6 I/ ?$ n0 |+ u( J# D
您需要登录后才可以回帖 登录 | 开始注册

本版积分规则

关闭

站长推荐上一条 /4 下一条

北京云银创陇科技有限公司以云计算运维,代码开发

QQ|返回首页|Archiver|小黑屋|易陆发现技术论坛 ( 蜀ICP备2026014127号-1 )点击这里给我发消息

GMT+8, 2026-4-9 01:09 , Processed in 0.055838 second(s), 23 queries .

Powered by Discuz! X3.4 Licensed

© 2012-2025 Discuz! Team.

快速回复 返回顶部 返回列表