我尝试使用Netflix Turbine (1.1.5)对hystrix (1.1.5)流进行分组。
Turbine应用程序配置:
spring.application.name=moritoring_server
server.port=8989eureka.client.serviceUrl.defaultZone=http://localhost:8761/eureka eureka.instance.preferIpAddress=true
turbine.aggregator.clusterConfig=MPI_Services turbine.appconfig=MPI_Services
运行状况-检查使用hystrix并需要在Turbine Dashboard中显示的应用程序:
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流中使用集群,它似乎一直在加载,


有人能建议我如何解决这个问题吗?
谢谢,肖恩
发布于 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:
management:
security:
enabled: false
port: 8081
hystrix:
enabled: trueDemo bootstrap.yml:
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: 8082Hystrix仪表板和涡轮机bootstrap.yml
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
...
turbine:
aggregator:
clusterConfig: DEMO-SERVICE
appConfig: demo-service在启动该解决方案的所有部分后,Hystrix仪表板可在以下位置获得
http://localhost:8989/hystrix然后是要使用的Turbine流URL
http://localhost:8989/turbine.stream?cluster=DEMO-SERVICE仪表板的完整Hystrix仪表板和Turbine URL:
http://localhost:8989/hystrix/monitor?stream=http%3A%2F%2Flocalhost%3A8989%2Fturbine.stream%3Fcluster%3DDEMO-SERVICEhttps://stackoverflow.com/questions/43107904
复制相似问题