Spring Cloud和Hystrix,可以在一个仪表板上监控两种应用程序



我实际上正在尝试使用Spring Cloud的微服务。我有两种应用(mysolutionmysolution-identity-provider)。它们都启用了Hystrix和Actuator,并通过hystrix.stream端点提供信息。我还充分利用Eureka, Ribbon和Feign进行内部交流。

我试图在单独的服务器上设置HystrixDashboardTurbine。这是我的application.yml:

turbine:
    aggregator:
        clusterConfig:MYSOLUTION
    appConfig: mysolution,mysolution-identity-provider

当我启动涡轮机服务器时,它成功地通过使用Eureka找到我的2个应用程序的实例。但它只从一个应用程序(mysolution)检索Hystrix流。

日志:

EurekaInstanceDiscovery: Fetching instance list for apps: [mysolution, mysolution-identity-provider]
EurekaInstanceDiscovery: Fetching instances for app: mysolution
EurekaInstanceDiscovery: Received instance list for app: mysolution, size=1
EurekaInstanceDiscovery: Fetching instances for app: mysolution-identity-provider
EurekaInstanceDiscovery: Received instance list for app: mysolution-identity-provider, size=1
InstanceObservable: Retrieved hosts from InstanceDiscovery: 2
InstanceObservable: Found hosts that have been previously terminated: 0
InstanceObservable: Hosts up:2, hosts down: 0
InstanceMonitor: Url for host: http://mac-mini.local:8080/hystrix.stream MYSOLUTION

是否有一种方法使涡轮机从两个应用程序检索流?我成功地遵循了Spring Cloud文档直到现在,关于Hystrix Turbine(没有AMQP)的部分仍然存在…多云…

设置以下内容应该有效:

turbine:
  aggregator:
    clusterConfig: MYSOLUTION,MYSOLUTION-IDENTITY-PROVIDER

您需要在clusterConfig中的每个服务。你需要把集群放到涡轮机url http://{turbine-hostname}:{turbine-port}/turbine.stream?cluster=MYSOLUTION

相关内容

最新更新