【发布时间】:2021-12-03 20:55:42
【问题描述】:
我将我的应用程序从 SpringBoot 2.1.18 升级到 SpringBoot 2.5.7,我看到升级后 SpringBootAdmin UI 中不再显示 diskSpace 等运行状况详细信息。我使用的是 SBA 2.0.0 并且没有改变它。
健康端点仍然包括它们,但顶级键已从 details 重命名为 components。我认为这是让 SBA 感到困惑的原因,但更奇怪的是,尽管如此,我的自定义运行状况指示器仍会显示在 SBA 中。
知道如何解决这个问题吗?
旧
{
"status": "OUT_OF_SERVICE",
"details": {
"myCustomHealthIndicator": {
"status": "OUT_OF_SERVICE",
"details": {
"Reason": "Suspect State message received",
"StateText": "Connection failed; Channel disconnected"
}
},
"diskSpace": {
"status": "UP",
"details": {
"total": 107361579008,
"free": 94436716544,
"threshold": 10485760
}
},
"refreshScope": {
"status": "UP"
}
}
}
新
{
"status": "OUT_OF_SERVICE",
"components": {
"diskSpace": {
"status": "UP",
"details": {
"total": 107361579008,
"free": 100102447104,
"threshold": 10485760,
"exists": true
}
},
"livenessState": {
"status": "UP"
},
"ping": {
"status": "UP"
},
"readinessState": {
"status": "UP"
},
"myCustomHealthIndicator": {
"status": "OUT_OF_SERVICE",
"details": {
"Reason": "Suspect State message received",
"StateText": "Connection failed; Channel disconnected"
}
}
},
"groups": [
"liveness",
"readiness"
]
}
【问题讨论】:
标签: spring-boot spring-boot-admin