【发布时间】:2020-05-18 11:30:57
【问题描述】:
我正在为我的项目使用 Spring Boot 和微服务架构。我想检查我的应用程序的运行状况。
我在 eureka-server 注册了 3 个服务。
我可以检查 eureka-server 的健康状况,但如何了解其他服务的健康状况?
http://localhost:8080/actuator/health
这工作但http://localhost:8080/api/user-service/actuator/health 不工作
请帮助解决方法。
谢谢!
【问题讨论】:
-
每个微服务在自己的进程中公开该端点。例如,您应该检查localhost:(port)/actuator/health 才能看到它。您也可以使用它为您收集这些信息到一个中心位置:github.com/codecentric/spring-boot-admin
标签: java spring-boot microservices netflix-eureka spring-boot-actuator