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

重新启动项目查看结果:

相关推荐
小马爱记录2 天前
sentinel规则持久化
java·spring cloud·sentinel
小马爱记录2 天前
Sentinel微服务保护
spring cloud·微服务·架构·sentinel
爱编程的张同学6 天前
OpenFeign和Gateway集成Sentinel实现服务降级
spring cloud·sentinel
运维老曾6 天前
Redis-6.2.9 Sentinel 哨兵配置
redis·sentinel
曼彻斯特的海边6 天前
spring-cloud-alibaba-sentinel-gateway
gateway·sentinel·springcloud
xujinwei_gingko6 天前
微服务-Sentinel
微服务·sentinel
_r0bin_10 天前
Sentinel
sentinel
LL小蜗牛10 天前
Alibaba Sentinel 入门教程:从理论到实战
sentinel
飞飞98710 天前
spring sentinel
java·spring·sentinel
cui_hao_nan11 天前
Sentinel限流熔断机制实战
java·sentinel