codecentric / spring-boot-admin

Admin UI for administration of spring boot applications
Apache License 2.0
12.34k stars 3.08k forks source link

[Questions]How to define different health url for different client? #949

Closed biwugang closed 5 years ago

biwugang commented 5 years ago

Use consul as the Spring Cloud Discovery, and add discoveryClient to Spring Boot Admin Server.

There are two spring client Service_A, Service_B, Service_A's health check url is /serviceA/health, Service_B's health check url is /serviceB/health,

Then how to define the different health url for different client?

The application.yml for admin service is:

server:
  port: 9001
  servlet:
    context-path: /admin

spring:
  cloud:
    consul:
      host: 127.0.0.1
      port: 8500
      enabled: true
      register: true
      discovery:
        enabled: true
        healthCheckPath: /admin/actuator/health
        preferIpAddress: true
        query-passing: true

management:
  endpoints:
    web:
      exposure:
        include: '*'
joshiste commented 5 years ago

http://codecentric.github.io/spring-boot-admin/current/#_converting_serviceinstances