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

重新启动项目查看结果:

相关推荐
一个儒雅随和的男子17 小时前
sentinel底层原理剖析以及实战优化
java·网络·sentinel
我是一颗柠檬2 天前
【Java项目技术亮点】接口限流熔断:从Sentinel到令牌桶/漏桶,手把手教你构建高可用服务防护体系
java·数据库·sentinel
Trouvaille ~3 天前
【Redis篇】Redis 哨兵(Sentinel):高可用自动故障转移
数据库·redis·缓存·中间件·sentinel·高可用·哨兵
真实的菜5 天前
Redis 从入门到精通(五):哨兵模式(Sentinel)—— 自动故障转移的完整原理与实战
数据库·redis·sentinel
Demon1_Coder6 天前
Day3-微服务-Sentinel-具体使用
java·微服务·sentinel
常常有7 天前
Redis:哨兵模式 (Sentinel)
redis·python·sentinel
海市公约10 天前
Redis 哨兵模式底层原理与自动故障转移全流程
redis·sentinel·redis哨兵·高可用架构·主观下线·客观下线·leader选举
辞忧九千七11 天前
Redis 哨兵(Sentinel)模式部署教程(基于一主二从架构)
redis·架构·sentinel
rising start13 天前
Redis 哨兵模式(Sentinel)
数据库·redis·sentinel
苏渡苇14 天前
强强联合:OpenFeign 整合 Sentinel
spring boot·spring cloud·微服务·sentinel·openfeign