我已经阅读了一些文档,并了解了如何使用this one之类的Actuator设置就绪和活动端点。但是我不知道如何为“启动”探测设置端点。
我的应用程序yml:
management:
endpoints:
web:
exposure:
include: "*"
endpoint:
health:
show-details: "ALWAYS"
group:
readiness.include: readinessProbe, dataStream
startup.include: readinessProbe, dataStream我的部署配置:
livenessProbe:
httpGet:
path: "/actuator/health/liveness"
port: "http"
initialDelaySeconds: 600
periodSeconds: 15
readinessProbe:
httpGet:
path: "/actuator/health/readiness"
port: "http"
periodSeconds: 30
failureThreshold: 15
startupProbe:
httpGet:
path: "/actuator/health/startup"
port: "http"
initialDelaySeconds: 150
periodSeconds: 10
failureThreshold: 30执行器似乎没有为“启动”探测提供URL,或者换句话说,http://localhost:8080/actuator/health/startup不工作。我如何设置它?
发布于 2021-06-17 04:11:36
Spring boot不会为启动探测公开单独的端点。对于这个用例,您也可以使用活动探测器。在kubernetes中使用不同的探测器的理由是为应用程序的初始启动启用较长的超时,这可能需要一些时间。在第一次成功的启动探测调用之后,活动探测接管,减少了超时值以快速检测故障并重新启动应用程序。
https://stackoverflow.com/questions/68007519
复制相似问题