首页 > Windows开发 > 详细

Unable to connect to Command Metric Stream 'api/turbine/stream?cluster=REPORTS' Error: {"isTrusted"}

时间:2020-01-13 15:20:58      阅读:82      评论:0      收藏:0      [点我收藏+]

Spring  Boot Admin 整合Hystrix UI Module,Turbine UI Module.

报如下错误: 

技术分享图片技术分享图片?首先确保你的admin-server引入了一下的依赖:

<!--引入hystrix -->
		<dependency>
			<groupId>de.codecentric</groupId>
			<artifactId>spring-boot-admin-server-ui-hystrix</artifactId>
			<version>1.5.7</version>
		</dependency>
		<!--引入turbine  -->
		<dependency>
			<groupId>de.codecentric</groupId>
			<artifactId>spring-boot-admin-server-ui-turbine</artifactId>
			<version>1.5.7</version>
		</dependency>
技术分享图片

application.propertes添加如下配置:

spring.boot.admin.routes.endpoints=env,metrics,dump,jolokia,info,configprops,trace,logfile,refresh,flyway,liquibase,heapdump,loggers,auditevents,hystrix.stream
spring.boot.admin.turbine.clusters=default
#turbine服务id,turbine服务可以作为单独的服务
#Turbine服务器的ServiceId或URL(不包含/turbine.stream)。 必须可以从管理服务器访问。

spring.boot.admin.turbine.location=hystrix-dashboard-turbine
技术分享图片

对于spring.boot.admin.turbine.location 的配置默认为‘turbine’服务。  Turbine服务器配置可以是serviceId或者是URL(具体可以参考官方文档)

上面的hystrix-dashboard-turbine是我turbine服务器的servceId.具体不懂可参考https://blog.csdn.net/niugang0920/article/details/80107804

其实底层是用Hystrix进行实施监控的。HystrixCommand和HystrixObservableCommand在执行时,会生成执行结果和运行指标,比如每秒执行的请求数、成功等。

其实就是对方法上的@HystrixCommand进行监控。

技术分享图片技术分享图片?

上述配置正确就ok了。

技术分享图片技术分享图片?

                                                                               微信公众号: 

                                               技术分享图片技术分享图片?

                                                                             JAVA程序猿成长之路

                            分享资源,记录程序猿成长点滴。专注于Java,Spring,SpringBoot,SpringCloud,分布式,微服务。

Unable to connect to Command Metric Stream 'api/turbine/stream?cluster=REPORTS' Error: {"isTrusted"}

原文:https://www.cnblogs.com/niugang0920/p/12187250.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!