- 论坛徽章:
- 0
|
本帖最后由 class3 于 2010-07-28 15:44 编辑
如果要实现显示二个或更多监测对象,需要对服务端和客户端进行设置
在服务端data_source中,需要确定第一对象作为该集群的主对象(最好是linux机器),同时在该机器上设置该集群中机器的别名(如/etc/hosts)
对于该集群中的其它对象需要在客户端中设置并指定到第一对象
例如:
在gmetad中设置,1.1.1.1为主对象
data_source “ds” 1.1.1.1 1.1.1.2 1.1.2.3
在ds1的/etc/hosts中设置别名(小写),这样在web页面就可以显示别名了
1.1.1.1 ds1
1.1.1.2 ds2
1.1.2.3 ds3
在gmond
将客户端都设置为单播模式并在udp_send_channel 中指定到主对象(主对象无需指定),port根据gmetad中的设置。默认为8649
udp_send_channel {
host = 1.1.1.2
port = 8649
host = 1.1.1.1
port = 8649
}
udp_recv_channel {
port = 8649
}
#在这里可以添加数据访问控制
tcp_accept_channel {
port = 8649
acl {
default = "deny"
access {
ip = x.x.x.x
mask = netmask
action = "allow"
}
}
} |
|