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

重新启动项目查看结果:

相关推荐
zfj32111 小时前
手动搭建Redis1主2从+ 3 Sentinel 高可用集群
redis·sentinel·高可用
power-辰南5 天前
基于 Spring Cloud + Sentinel 的全面流量治理方案
spring·spring cloud·sentinel·流量治理
蔚一6 天前
微服务SpringCloudAlibaba组件sentinel教程【详解sentinel的使用以及流量控制、熔断降级、热点参数限流等,附有示例+代码】
java·spring boot·后端·微服务·架构·sentinel·intellij-idea
华农第一蒟蒻6 天前
Sentinel
java·开发语言·sentinel
qw9497 天前
Redis 09章——哨兵(sentinel)
数据库·redis·sentinel
FG.7 天前
微服务保护---Sentinel
微服务·sentinel
Xwzzz_8 天前
SpringCloud中Sentinel基础场景和异常处理
java·spring cloud·sentinel
bing_1588 天前
Springboot 中如何使用Sentinel
spring boot·sentinel
power-辰南10 天前
微服务限流策略与性能优化全解析
性能优化·sentinel·springcloud·流量监控·流量治理
WeiLai111212 天前
Redis Sentinel(哨兵)模式介绍
redis·bootstrap·sentinel