Spring Boot Actuator + Spring Boot Admin - Is there a way to define a custom management url?
If you are using service discovery for application lookup you could define the exposed management port in instance metadata. This metadata is used to build up the management URL.More details documented here:
http://codecentric.github.io/spring-boot-admin/current/#spring-cloud-discovery-support
Handling is done in de.codecentric.boot.admin.server.cloud.discovery.DefaultServiceInstanceConverter
Example for Eureka:eureka.instance.metadata-map.management.port=[K8S-EXPOSED-PORT]
If you are using Service Discovery, take a look into DefaultServiceInstanceConverter
, try specifying the management.port
property.
If you are not using Service Discovery, then take a look into de.codecentric.boot.admin.server.domain.values.Registration
, you might need to use the builder apis to register your application correctly (try to set managementUrl
properly). Note, you will need to do this in your client application (the one which is being monitored).