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

重新启动项目查看结果:

相关推荐
空中海17 小时前
第六篇:可靠性篇 — Sentinel 熔断限流与 Seata 分布式事务
分布式·sentinel
JAVA面经实录91720 小时前
如何选择适合项目的「限流 / 熔断 / 降级」方案
java·spring·kafka·sentinel·guava
蓝眸少年CY3 天前
(第十五篇)spring cloud之Sentinel实现熔断与限流
数据库·spring cloud·sentinel
无风听海5 天前
Python 哨兵值模式(Sentinel Value Pattern)深度解析
开发语言·python·sentinel
空中海6 天前
Redis 原理深度解析:持久化 × 主从复制 × Sentinel × Cluster × 性能排查全攻略
数据库·redis·sentinel
接着奏乐接着舞8 天前
Sentinel
sentinel
随风,奔跑8 天前
Spring Boot Alibaba(三)----Sentinel
spring boot·后端·sentinel
武超杰8 天前
Sentinel 安装启动 + 全规则详解 + Feign 整合 + 持久化
sentinel
青槿吖8 天前
Sentinel 进阶实战:Feign 整合 + 全局异常 + Nacos 持久化,生产环境直接用
java·开发语言·spring cloud·微服务·云原生·ribbon·sentinel
StackNoOverflow8 天前
Sentinel服务保护框架完全指南:从原理到实践
java·数据库·sentinel