首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Netflix Turbine不显示群集hystrix流

Netflix Turbine不显示群集hystrix流
EN

Stack Overflow用户
提问于 2017-03-30 11:19:50
回答 1查看 1.6K关注 0票数 2

我尝试使用Netflix Turbine (1.1.5)对hystrix (1.1.5)流进行分组。

Turbine应用程序配置:

代码语言:javascript
复制
spring.application.name=moritoring_server
server.port=8989

eureka.client.serviceUrl.defaultZone=http://localhost:8761/eureka eureka.instance.preferIpAddress=true

turbine.aggregator.clusterConfig=MPI_Services turbine.appconfig=MPI_Services

运行状况-检查使用hystrix并需要在Turbine Dashboard中显示的应用程序:

代码语言:javascript
复制
spring.application.name=health_checks_service
spring.cloud.config.enabled=true
spring.cloud.config.discovery.enabled=true
spring.cloud.config.discovery.serviceId=MPI_Services
server.port=8081

eureka.client.serviceUrl.defaultZone=http://localhost:8761/eureka
eureka.instance.preferIpAddress=true
eureka.instance.metadataMap.cluster=MPI_Services

我可以看到来自Eureka的集群如下所示,来自Turbine的单个Hystrix流是好的,

然而,我不能在Turbine流中使用集群,它似乎一直在加载,

有人能建议我如何解决这个问题吗?

谢谢,肖恩

EN

回答 1

Stack Overflow用户

发布于 2017-07-10 15:48:54

这里有几点需要检查。

1)您正在监控的应用程序正在8081端口上提供hystrix.stream。尝试在应用程序中将eureka.instance.metadataMap.management.port设置为8081,以便Turbine能够找出正确的端口。检查this one以了解细节。

2)我尽量避免在集群名称中混淆大小写字母

3)在查看Hystrix Dashboard for shoing Turbine stream时,请确保您调用了演示应用程序,以便生成一些统计数据。仪表板保持为空(正在加载),直到第一批消息通过Hystrix命令传递

4)等待Turbine应用程序实际发现应用程序集群(检查Turbine应用程序日志中的“找到主机”和"Hosts up“消息)。这在特定的超时间隔之后发生,而不是在应用程序启动后立即发生

下面是我使用Spring Cloud Dalston.SR1时的一个配置

Demo application.yml:

代码语言:javascript
复制
management:
  security:
    enabled: false
  port: 8081

hystrix:
  enabled: true

Demo bootstrap.yml:

代码语言:javascript
复制
spring:
  application:
    name: demo-service
  cloud:
    config:
      discovery:
        enabled: true
        serviceId: config-service

eureka:
  client:
    register-with-eureka: false
    serviceUrl:
      defaultZone: http://localhost:8761/eureka/
  instance:
    hostname: ${APPLICATION_DOMAIN:localhost}
    nonSecurePort: 8090
    metadataMap:
      management.port: 8082

Hystrix仪表板和涡轮机bootstrap.yml

代码语言:javascript
复制
spring:
  application:
    name: hystrix-service
  cloud:
    config:
      discovery:
        enabled: true
        serviceId: config-service

eureka:
  client:
    register-with-eureka: false
    serviceUrl:
      defaultZone: http://localhost:8761/eureka/

Hystrix仪表板和涡轮机application.yml

代码语言:javascript
复制
...
turbine:
  aggregator:
    clusterConfig: DEMO-SERVICE
  appConfig: demo-service

在启动该解决方案的所有部分后,Hystrix仪表板可在以下位置获得

代码语言:javascript
复制
http://localhost:8989/hystrix

然后是要使用的Turbine流URL

代码语言:javascript
复制
http://localhost:8989/turbine.stream?cluster=DEMO-SERVICE

仪表板的完整Hystrix仪表板和Turbine URL:

代码语言:javascript
复制
http://localhost:8989/hystrix/monitor?stream=http%3A%2F%2Flocalhost%3A8989%2Fturbine.stream%3Fcluster%3DDEMO-SERVICE
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/43107904

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档