找回密码
 注册
查看: 3992|回复: 2

ganglai采集数据

[复制链接]

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
发表于 2017-8-31 13:28:12 | 显示全部楼层 |阅读模式
ganglai采集数据
3 b% V' ~2 p3 O6 c1 l1 g! J  v) h需要配置ganglai的配置文件gmod.conf! v, O" n% G) i- P3 M' j& m5 K
- N. |$ I* E5 G2 L% F/ }, Y7 ]
  deaf = no   #服务端配置no,客户端配置yes
  x/ _: |7 f$ ]" L. b. a6 I0 r6 I+ G% f/ X9 j" `
找到下面配置:客户端和服务端一样。2 ?! T# ~" v2 K5 y, w
   udp_send_channel {  #bind_hostname = yes # Highly recommended, soon to be default.
; S0 V* t( \$ g/ V# M# w                       # This option tells gmond to use a source address/ J7 K8 `  U+ n9 W
                       # that resolves to the machine's hostname.  Without- Z8 F+ T3 a* j; K+ n$ N. B
                       # this, the metrics may appear to come from any4 A  |, H8 M6 ^& M- y
                       # interface and the DNS names associated with
1 W, ^4 P/ d' l' U* C* M* [                       # those IPs will be used to create the RRDs.
) R6 A- j) x# W3 ~: ]5 m#  mcast_join = 239.2.11.71
2 b1 o, y: t  s% q  host = clm.ganglia.server
" [. E9 B) J8 F1 _5 {  port = 8649
" [! O6 D. g- @/ ~7 \#  ttl = 1
! X. n$ B9 \/ F( e3 _' o# ~}$ Z/ I. [" Y; ?& _; q

: V# U' V( m2 O( B' Q" h重启gmod.service服务8 @+ \# y1 @1 W1 i# k/ U9 D; A
systemctl restart gmod.service# R- y, @+ g# M# ]  J
; i( l  d2 V; E2 o/ N/ h
添加需要添加语句:
" Z% [& Z# L/ }6 _& m0 Y) l   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','','');2 C* ]- @/ j- e  W& q% b

1 i3 J( [9 }$ j( B
Query OK, 1 row affected
. _3 I; y) O+ i+ V
CIDC-R-01-IPSUB-00000323  #系统中配置的网络段地址) G' m) B$ V+ G1 G& \6 n: f+ \; V; `
   10.15.4.3 #为服务端的地址。% b6 Z2 M$ A$ P% A+ m# C; I
接下来启动performance服务
4 S- A% @4 ~1 s
% S# b: Z; _0 {

  `* N7 ^* r+ e- B# U% E. Z; m+ d7 W& ?7 V. z  V; t4 f
3 q" B, O( k; |0 S
# cd /apps/svr/PerformancePM% l% R6 o) v& o. O% m# y" n
#/apps/svr/PerformancePM/Performance/startup.sh& k; r( a$ c* O5 X$ ^* `0 n! F% a1 t

- K% M& v) c: r# M# ps -ef |grep performance
5 \& B, q( R& o$ J2 {% F# R* B) g  u& G7 }! G

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
 楼主| 发表于 2017-8-31 13:35:01 | 显示全部楼层
采集数据基本就可以使用了。要记得加iptables规则哦;. c# b) k/ x$ g" D' V) D
-A INPUT -p tcp -m tcp --dport 8649 -m comment --comment "ganglai" -j ACCEPT6 g0 l0 ~. ]# ~' ]6 f) \9 g5 h
-A INPUT -p udp --dport 8649 -j ACCEPT

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
 楼主| 发表于 2017-8-31 15:06:35 | 显示全部楼层
采集节点多的情况下可以使用脚本协助处理。或者ansible工具安装。" ^- M0 E. \% C) \* [2 u2 a
您需要登录后才可以回帖 登录 | 注册

本版积分规则

返回首页|Archiver|手机版|小黑屋|易陆发现技术论坛 ( 蜀ICP备2026014127号-1 )

GMT+8, 2026-6-12 01:58 , Processed in 0.019110 second(s), 23 queries .

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

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