Sentinel实时监控不展示问题

问题

官方插件

Endpoint 支持,可以实时统计出SpringBoot的健康状况和请求的调用信息

在使用 Endpoint 特性之前需要在 Maven 中添加 **spring-boot-starter-actuator**依赖,并在配置中允许 Endpoints 的访问。

  • Spring Boot 1.x 中添加配置 management.security.enabled=false。暴露的 endpoint 路径为 /sentinel

  • Spring Boot 2.x 中添加配置 management.endpoints.web.exposure.include=*。暴露的 endpoint 路径为 /actuator/sentinel

Sentinel Endpoint 里暴露的信息非常有用。包括当前应用的所有规则信息、日志目录、当前实例的 IP,Sentinel Dashboard 地址,Block Page,应用与 Sentinel Dashboard 的心跳频率等等信息。

解决问题

1.项目添加依赖

复制代码
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-actuator</artifactId>
</dependency>

2.增加配置:

根据自己的SpringBoot版本添加配置:

  • Spring Boot 1.x 中添加配置 management.security.enabled=false。暴露的 endpoint 路径为 /sentinel

  • Spring Boot 2.x 中添加配置 management.endpoints.web.exposure.include=*。暴露的 endpoint 路径为 /actuator/sentinel

重新启动项目查看结果:

相关推荐
T_Ghost13 小时前
SpringCloud微服务服务容错机制Sentinel熔断器
spring cloud·微服务·sentinel
你是人间五月天1 天前
sentinel实现控制台与nacos数据双向绑定
windows·sentinel
无名客01 天前
sentinel限流常见的几种算法以及优缺点
算法·sentinel·限流
tsxchen1 天前
centos9安装sentinel
sentinel
寒士obj2 天前
Sentinel服务治理:服务降级、熔断与线程隔离
sentinel
iiYcyk2 天前
Hystrix与Sentinel-熔断限流
hystrix·sentinel·springcloud
勇往直前plus2 天前
Sentinel微服务保护
java·spring boot·微服务·sentinel
boy快快长大4 天前
【Spring Cloud Alibaba】Sentinel(一)
sentinel
java干货4 天前
Sentinel和Cluster,到底该怎么选?
sentinel
27^×4 天前
Sentinel 与 Feign 整合详解:实现服务调用的流量防护
sentinel