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

重新启动项目查看结果:

相关推荐
jyOverQ17 小时前
Redis 主从复制、Sentinel 和 Cluster 到底有什么区别?
java·redis·sentinel
流烟默2 天前
网关 Sentinel 限流实战:API 分组、规则加载与全量匹配踩坑记
nacos·gateway·sentinel·流控规则
guo_wen_qiang7 天前
云服务器sentinel搭建-控制台
服务器·sentinel
guo_wen_qiang7 天前
项目使用sentinel遇到的问题
java·sentinel
天天喝旺仔23 天前
分布式服务容错实战:用 Sentinel 实现限流、熔断与降级
分布式·微服务·云原生·sentinel
YOU OU1 个月前
Alibaba Sentinel
sentinel
流烟默1 个月前
Sentinel 规则持久化到 Nacos 实践(网关篇 + 普通应用篇)
nacos·sentinel·规则持久化
莫得感情 o1 个月前
Redis 09 · 高可用:Sentinel 如何发现故障并完成切主
redis·缓存·sentinel
凌云若寒1 个月前
CODESOFT试用流程
linux·运维·网络·数据库·sentinel
多敲代码防脱发1 个月前
Alibaba Sentinel(熔断、限流)(国内下载Sentinel)
java·开发语言·sentinel