7.3. Turbine集群监控:配置多个集群组
1、集群分组
将futurecloud-hystrix-cluster1项目复制3份,分别为:
futurecloud-hystrix-cluster4、futurecloud-hystrix-cluster5、futurecloud-hystrix-cluster6
将futurecloud-hystrix-cluster1、futurecloud-hystrix-cluster2、futurecloud-hystrix-cluster3作为一个集群组,集群名称为:BASECLUSTER
将futurecloud-hystrix-cluster4、futurecloud-hystrix-cluster5、futurecloud-hystrix-cluster6作为一个集群组,集群名称为:HACLUSTER
在以上6个项目的application.yml文件中配置各自所属集群,添加属性:eureka.instance.metadata-map.cluster: 集群名 。
futurecloud-hystrix-cluster1、futurecloud-hystrix-cluster2、futurecloud-hystrix-cluster3 配置如下:
#将此服务注册到eureka 服务上
eureka:
client:
serviceUrl:
defaultZone: http://user:123@localhost:10000/eureka
instance:
prefer-ip-address: true #将注册到eureka服务的实例使用ip地址
metadata-map:
cluster: BASECLUSTER #此服务属于BASECLUSTER
status-page-url-path: /actu