【问题标题】:Is there any idea to disable hystrix indicator?有什么想法可以禁用 hystrix 指标吗?
【发布时间】:2020-01-25 04:56:37
【问题描述】:

检查 /health 端点,我想从下面的响应中禁用 hystrix。

{
  "status": "UP",
  "details": {
    "hystrix": {
      "status": "UP"
    }
  }
}

检查HystrixHealthIndicator,没有办法禁用它。 这里有什么解决办法吗?

【问题讨论】:

  • 看起来我必须创建一个 pr 才能使其工作,在 HystrixHealthIndicator 上添加 ConditionalOnProperty。
  • 不需要。它遵循使用键“hystrix”禁用健康指标的正常启动约定

标签: java spring-cloud hystrix


【解决方案1】:

相关配置在production-ready-endpoints 有详细记录。

禁用所有默认指标

management.health.defaults.enabled=false

仅禁用 hystrix

management.health.hystrix.enabled=false

如需进一步调查,请查看ConditionalOnEnabledHealthIndicator。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2015-11-26
    • 1970-01-01
    • 2016-08-05
    • 2023-03-18
    • 2012-12-07
    • 2017-03-01
    • 1970-01-01
    相关资源
    最近更新 更多