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

重新启动项目查看结果:

相关推荐
Jul1en_3 小时前
【SpringCloud】微服务 Sentinel 详解
java·spring·sentinel
Jul1en_1 天前
【Redis】Sentinel 哨兵支持,附带 Docker 部署教程
redis·docker·sentinel
phltxy3 天前
Redis Sentinel:主从架构的自动保镖详解
redis·架构·sentinel
接着奏乐接着舞5 天前
springcloud Sentinel
spring·spring cloud·sentinel
超梦dasgg6 天前
Sentinel生产环境实战全解
java·微服务·sentinel
Ting-yu6 天前
SpringCloud快速入门(11)---- Sentinel(异常处理)
java·spring boot·后端·spring·spring cloud·sentinel
Ting-yu6 天前
SpringCloud快速入门(10)---- Sentinel(应用场景&控制台安装)
spring·spring cloud·sentinel
heimeiyingwang8 天前
【架构实战】服务熔断与限流Sentinel:高可用服务的守护神
架构·sentinel
庞轩px9 天前
第八篇:Spring与微服务——从SpringBoot到SpringCloud的演进
spring boot·spring·微服务·nacos·gateway·sentinel
卷毛的技术笔记12 天前
双十一零点扛过10倍流量洪峰:Sentinel与Redis+Lua的分布式限流深度避坑指南
java·redis·分布式·后端·系统架构·sentinel·lua