You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Apache Camel Spring Boot健康检查详情不显示问题求助

Apache Camel Spring Boot健康检查无详细信息问题排查

问题描述

使用Apache Camel Spring Boot 3.1.2(Camel版本4.0.0),已启用健康检查且功能正常,但/health接口始终仅返回UP/DOWN状态,无详细信息,即便已将exposure-level设置为full。当前配置如下:

management:
  endpoints:
    web:
      base-path: "/"
      exposure:
        include: health,info,loggers,camelroutes
    probes:
      enabled: true
    health:
      show-details: always
  health:
    livenessState:
      enabled: true
    readinessState:
      enabled: true

camel:
  springboot:
    route-controller-supervise-enabled: true
    route-controller-back-off-max-attempts: 10
  health:
    enabled: true
    # level of details exposed by camel-health check (full, default, or oneline)
    exposure-level: full
    producers-enabled: true
    registry-enabled: true
    consumers-enabled: true
    routes-enabled: true

预期设置exposure-level: full后应显示更多健康检查详情,但未生效。

解决方案

  • 修正Spring Boot健康详情配置层级:你的配置中management.endpoints.health.show-details路径有误,Spring Boot正确配置应为management.endpoint.health.show-details(单数endpoint),修改后配置:

    management:
      endpoint:
        health:
          show-details: always
    

    该配置控制Actuator健康端点是否展示详细信息,只有开启后,Camel的健康检查详情才会被聚合返回。

  • 确认依赖完整性:确保项目已引入camel-health-starter依赖(Maven示例):

    <dependency>
        <groupId>org.apache.camel.springboot</groupId>
        <artifactId>camel-health-starter</artifactId>
        <version>4.0.0</version>
    </dependency>
    

    缺失该依赖会导致Camel健康检查的详细项无法加载。

  • 验证路由监控状态:通过/camelroutes端点确认路由均处于started状态,确保camel.springboot.route-controller-supervise-enabled: true已生效,路由控制器未正常监控会导致路由相关健康详情缺失。

  • 访问细分健康端点:默认/health返回聚合状态,可直接请求/health/liveness或/health/readiness端点,查看是否包含Camel的健康检查详情。

内容的提问来源于stack exchange,提问作者Harold Chen

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.09 04:06:02