We are currently using Spring Boot Admin for monitoring our microservices inside the OpenShift cluster.
Spring Boot Admin aplication get information about services from the Openshift's Service Discovery using spring-cloud-starter-kubernetes dependency.
Everything was fine until we deployed application with custom server.servlet.context-path.
For example, our microservice has server.servlet.context-path=/dictionary. However, Spring Boot Admin get the following information from the OpenShift's discovery:
{
"registration": {
"name": "dictionary-service",
"managementUrl": "http://10.130.1.169:8080/actuator",
"healthUrl": "http://10.130.1.169:8080/actuator/health",
"serviceUrl": "http://10.130.1.169:8080/",
"source": "discovery",
"metadata": {
"app": "dictionary-service",
...
}
}
}
So, Spring Boot Admin is expecting actuator working on "http://10.130.1.169:8080/actuator"
but it's actually working on "http://10.130.1.169:8080/dictionary/actuator"
How can we customize managementUrl and healthUrl so our Spring Boot Admin server could use correct URL for monitoring this service?