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

ganglai采集数据

[复制链接]

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
发表于 2017-8-31 13:28:12 | 显示全部楼层 |阅读模式
ganglai采集数据
5 ^+ }) s( D- \3 ]需要配置ganglai的配置文件gmod.conf
# p0 q; {! x' g/ h" {+ T: D# l, J; h6 D' T# A$ [
  deaf = no   #服务端配置no,客户端配置yes
  D$ F8 C' [$ a3 y2 J. |
0 h' Z1 M$ K" T找到下面配置:客户端和服务端一样。
/ y" P' ^& u, c* W   udp_send_channel {  #bind_hostname = yes # Highly recommended, soon to be default., l; h* A6 _" b! Z: j) n6 [
                       # This option tells gmond to use a source address! Y  c+ V' B, H: L
                       # that resolves to the machine's hostname.  Without2 `7 {  B* Y9 ^5 x9 W/ s  W( p
                       # this, the metrics may appear to come from any
0 Y% F; p& @* S' A" I                       # interface and the DNS names associated with
2 f, _* _% e4 W# A( a1 j                       # those IPs will be used to create the RRDs.
) y2 y1 ]/ d3 {6 T2 ?! ]% Q& C#  mcast_join = 239.2.11.71
+ u3 c- _+ V& l/ U" a% \  host = clm.ganglia.server$ _% W6 T; K. [* j
  port = 86498 l6 M9 ?7 i8 X0 [
#  ttl = 1
$ ^. B1 _# l3 N- b* ]1 [}
9 o) S, W+ ?5 c* m+ D
( f! h7 M2 D  N; d重启gmod.service服务' |, y: }. ^1 \7 e! Y' Y3 [- P
systemctl restart gmod.service
3 B! j' ^  s  v( g. a( ], n
8 E# M6 B2 k$ T1 G添加需要添加语句:/ q; B/ c6 x/ D9 @
   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','','');( I& T' \( I/ H0 n8 X& |

; f; m( Z7 h& t
Query OK, 1 row affected
) ~, w! b5 n) r- K
CIDC-R-01-IPSUB-00000323  #系统中配置的网络段地址
# ^* Y7 d; G. j% [  f# i   10.15.4.3 #为服务端的地址。
% o& V: m% F% L. D$ B接下来启动performance服务
1 ^. E  h! T- z
% @5 v% Z; }  z! l7 _* ?3 Y& M

' q8 a! }6 e( d$ r" `* U9 H) }# [4 G4 W1 H* h

' j3 ~- v4 P, o6 ?6 |+ G# cd /apps/svr/PerformancePM
6 q3 I) Y2 Q5 L: h. l# e#/apps/svr/PerformancePM/Performance/startup.sh
" k: b5 R. f7 E  t3 g$ J5 _" t; E3 m& M. `0 K
# ps -ef |grep performance
1 M0 E1 z( L$ s3 y, a& Q! z4 p% R! T

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
 楼主| 发表于 2017-8-31 13:35:01 | 显示全部楼层
采集数据基本就可以使用了。要记得加iptables规则哦;$ m) L# T* ^7 }. z
-A INPUT -p tcp -m tcp --dport 8649 -m comment --comment "ganglai" -j ACCEPT# p* ]- V1 r- `- K. q8 \7 ]3 n. [# V
-A INPUT -p udp --dport 8649 -j ACCEPT

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
 楼主| 发表于 2017-8-31 15:06:35 | 显示全部楼层
采集节点多的情况下可以使用脚本协助处理。或者ansible工具安装。
) v0 S( k  a$ x" H. c
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-12 03:03 , Processed in 0.019778 second(s), 23 queries .

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

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