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

重新启动项目查看结果:

相关推荐
会飞的大可4 天前
Redis Sentinel 高可用方案在WMS仓储管理系统的应用
redis·sentinel
zs宝来了5 天前
Redis 哨兵机制:Sentinel 原理与高可用实现
redis·sentinel·高可用·源码解析·哨兵
梵得儿SHI5 天前
SpringCloud 秒杀系统生产级落地:Sentinel+Redis 联合优化,从限流防刷到库存闭环,彻底解决超卖 / 宕机 / 恶意刷
redis·spring cloud·sentinel·分布式限流·百万级·瞬时高并发·产级秒杀系统解决方案
8Qi87 天前
Redis哨兵模式(Sentinel)深度解析
java·数据库·redis·分布式·缓存·sentinel
无名-CODING7 天前
Java 爬虫零基础入门:从 HTTP 到 Jsoup 实战
spring cloud·gateway·sentinel
会飞的大可8 天前
Spring Cloud Alibaba全景:Nacos、Sentinel、Seata整合实战
sentinel·wpf
无名-CODING8 天前
SpringCloud 网关与熔断:Gateway + Sentinel 快速入门
spring cloud·gateway·sentinel
yoyo_zzm12 天前
SpringCloud Gateway 集成 Sentinel 详解 及实现动态监听Nacos规则配置实时更新流控规则
spring cloud·gateway·sentinel
短剑重铸之日13 天前
深入理解Sentinel: 01 一次服务雪崩问题排查经历
java·sentinel·降级熔断