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

重新启动项目查看结果:

相关推荐
库库林_沙琪马6 小时前
3、Sentinel
服务器·网络·sentinel
大大大大物~1 天前
Spring Cloud熔断与降级:核心区别与实践指南【怎么理解?解决了什么问题?各自的适用场景?Sentinel实现代码示例】
spring cloud·sentinel·熔断·降级
serendipity_hky1 天前
【SpringCloud | 第3篇】Sentinel 服务保护(限流、熔断降级)
java·后端·spring·spring cloud·微服务·sentinel
小毅&Nora1 天前
【后端】【诡秘架构】 ② 序列8:小丑 - 熔断降级的艺术:用 Sentinel 实现优雅降级,笑对流量洪峰
架构·sentinel·熔断降级
Haooog2 天前
微服务保护学习
java·学习·微服务·sentinel
布茹 ei ai3 天前
5、基于 GEE 的 Sentinel-1 SAR 地震滑坡变化检测系统:2022 泸定地震案例
javascript·sentinel·遥感·gee·云平台
lang201509283 天前
深入解析Sentinel熔断器核心机制
sentinel
lang201509283 天前
Sentinel系统保护规则深度解析
sentinel
lang201509283 天前
深入解析Sentinel熔断机制
java·前端·sentinel
lang201509283 天前
Sentinel熔断降级核心:DegradeSlot解析
sentinel