Search code examples
springspring-bootspring-boot-admin

Spring boot admin - register two instances of the same app


I would like to register two instances of the same application (only port is different) in spring boot admin server. But I see only one instance (MyApp instance 2) in my spring boot admin panel. What's wrong in my config?

Basic info:

  • Spring boot admin client - 2.0.0-SNAPSHOT
  • Spring boot admin server - 2.0.0-SNAPSHOT
  • Spring boot version (both) - 2.0.1.RELEASE

My application.yml file:

spring:
  boot:
    admin:
      client:
        url: http://example.org:7474/admin/
        instance:
          name: 'MyApp instance 1'
          service-url: http://example.org:7474/MyApp/
          service-base-url: http://example.org:7474/
          metadata:
            user.name: myuser
            user.password: mypassword
        instance:
          name: 'MyApp instance 2'
          service-url: http://example.org:27474/MyApp/
          service-base-url: http://example.org:27474/
          metadata:
            user.name: myuser
            user.password: mypassword
management:
  endpoints:
    web:
      exposure:
        include: "*"
  endpoint:
    health:
      show-details: ALWAYS

Solution

  • Currently the Spring Boot Admin Client is capable to do a single registration.

    I think it's rather unusual to register the same instance twice (as your config tries to do)

    If you include the client in each of the instances to register it works.