Spring boot admin 节点状态一直为DOWN的排查(忽略某一个节点的健康检查)

编程知识 更新时间:2023-04-05 03:44:52

项目中需要监控各个微服务节点的健康状态,找到了spring boot admin这个全家桶监控工具,它其实是Vue.js美化过的Spring Boot Actuator,官方的解释是:

codecentric’s Spring Boot Admin is a community project to manage and monitor your Spring Boot ? applications. The applications register with our Spring Boot Admin Client (via HTTP) or are discovered using Spring Cloud ? (e.g. Eureka, Consul). The UI is just a Vue.js application on top of the Spring Boot Actuator endpoints.

最新的版本是2.1.2,这里是官方文档。

个人觉得官方文档并不是十分的友好,推荐这个详细搭建的步骤供大家参考:

https://juejin.im/post/5c34bcfdf265da615b71a3a8

运行成功后服务节点一直显示为DOWN,访问 http://127.0.0.1:8081/actuator/health返回

可以看出redis 宕机了,但其实我项目本身没有使用redis。

在显示DOWN的客户端添加如下配置(忽略redis的健康检查):

spring:
  profiles:
    active: dev
management:
  health:
    redis:
      enabled: false
  endpoint:
    health:
      show-details: always
  endpoints:
    web:
      exposure:
        include: "*"
server:
  port: 8081
再次访问:http://127.0.0.1:8081/actuator/health

这里要注意一下,只要其中一个监控内容为DOWN,则该节点的总体状态就为DOWN

 

更多推荐

Spring boot admin 节点状态一直为DOWN的排查(忽略某一个节点的健康检查)

本文发布于:2023-04-05 03:44:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/bbde40aae59b4d4cb52bfdc63705dd92.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:节点   状态   健康   Spring   boot

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!

  • 44586文章数
  • 14阅读数
  • 0评论数