码迷,mamicode.com
首页 > 其他好文 > 详细

hystrix-dashborad监控仪表盘简单配置

时间:2020-04-04 20:19:37      阅读:67      评论:0      收藏:0      [点我收藏+]

标签:oca   name   net   gem   artifact   com   code   enc   ble   

需要被监控的微服务工程pom依赖

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
yml中
management.endpoints.web.exposure.include: hystrix.stream
监控工程pom依赖
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-hystrix-dashboard</artifactId>
</dependency>
yml中配置
服务端口号
server.port
微服务名称
spring.application.name
启动类上使用注解 启用Hystrix监控仪表盘功能

技术图片


@EnableHystrixDashboard

通过监控工程端口号+/hystrix
http://localhost:xxxx/hystrix访问hystrix网站
红色箭头所指位置写入被监控的微服务地址
http://localhost:xxxx/hystrix.system

技术图片


注:如要查看监控数据本身(json)
直接访问http://localhost:xxxx/hystrix.system
xxxx:具体微服务端口
如果此微服务启动开始后方法没有被访问过,那么显示的数据只有Ping,必须访问带有熔断的方法才会有实际数据

hystrix-dashborad监控仪表盘简单配置

标签:oca   name   net   gem   artifact   com   code   enc   ble   

原文地址:https://www.cnblogs.com/myPrBB/p/12633773.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!