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

重新启动项目查看结果:

相关推荐
h***06652 天前
SpringCloud Gateway 集成 Sentinel 详解 及实现动态监听Nacos规则配置实时更新流控规则
spring cloud·gateway·sentinel
7***A4432 天前
后端服务熔断降级:Sentinel配置
sentinel
b***66613 天前
SpringCloud Gateway 集成 Sentinel 详解 及实现动态监听Nacos规则配置实时更新流控规则
spring cloud·gateway·sentinel
ANYOLY4 天前
Sentinel 限流算法详解
算法·sentinel
百***68824 天前
SpringCloud Gateway 集成 Sentinel 详解 及实现动态监听Nacos规则配置实时更新流控规则
spring cloud·gateway·sentinel
E***q5395 天前
后端服务限流实现,Spring Cloud Alibaba Sentinel
java·开发语言·sentinel
凡客丶5 天前
SpringBoot整合Sentinel【详解】
spring boot·后端·sentinel
wzy06235 天前
Redis 哨兵模式中客户端访问服务器的过程详解
redis·sentinel
v***5655 天前
使用bitnamiredis-sentinel部署Redis 哨兵模式
数据库·redis·sentinel
Owen__z17 天前
GEE统计特定区域特定时间上的Landsat/Sentinel的影像信息
python·sentinel·gee·geemap·landsat