@Override
	public ManagementMetadata get(EurekaInstanceConfigBean instance, int serverPort, String serverContextPath,
			String managementContextPath, Integer managementPort) {
		if (isRandom(managementPort)) {
			return null;
		}
		if (managementPort == null && isRandom(serverPort)) {
			return null;
		}
		String healthCheckUrl = getHealthCheckUrl(instance, serverPort, serverContextPath, managementContextPath,
				managementPort, false);
		String statusPageUrl = getStatusPageUrl(instance, serverPort, serverContextPath, managementContextPath,
				managementPort);

		ManagementMetadata metadata = new ManagementMetadata(healthCheckUrl, statusPageUrl,
				managementPort == null ? serverPort : managementPort);
		if (instance.isSecurePortEnabled()) {
			metadata.setSecureHealthCheckUrl(getHealthCheckUrl(instance, serverPort, serverContextPath,
					managementContextPath, managementPort, true));
		}
		return metadata;
	}
Default implementation of {@link DefaultManagementMetadataProvider}.

@author Anastasiia Smirnova
spring-cloud-netflix-eureka-client/src/main/java/org/springframework/cloud/netflix/eureka/metadata/DefaultManagementMetadataProvider.java