【问题标题】:How to disable management endpoint probing with Spring Boot Admin?How to disable management endpoint probing with Spring Boot Admin?
【发布时间】:2022-12-19 03:33:46
【问题描述】:

We are running Spring Boot Admin in our k8s cluster. Applications with SBA client library are discovered during startup and SBA(server) is calling management endpoint during specified interval. We are actually interested to only probe i.e /health and /info endpoint without /actuator. Currently SBA is calling also management endpoint /actuator.

How to configure it to run server without calling management endpoint?

We would like to disable management endpoint for security purpose.

SBA Admin & SB version 2.6.6

I tried tweaking the settings but none of them solved my issue.

【问题讨论】:

    标签: spring-boot spring-boot-admin


    【解决方案1】:

    /actuator is the "meta" endpoint providing information about the available actuator endpoints. But you cannot "manage" anything there. The docs call it the "discovery page".

    If you activate health and info, then /actuator will tell that these are enabled and output should be something like

    GET http://127.0.0.1:8100/actuator
    
    {
      "_links": {
        "self": {
          "href": "http://127.0.0.1:8100/actuator",
          "templated": false
        },
        "health": {
          "href": "http://127.0.0.1:8100/actuator/health",
          "templated": false
        },
        "health-path": {
          "href": "http://127.0.0.1:8100/actuator/health/{*path}",
          "templated": true
        },
        "info": {
          "href": "http://127.0.0.1:8100/actuator/info",
          "templated": false
        }
      }
    }
    

    The SBA server uses this endpoint to know which actuators are available.

    However, you can disable the endpoint in the monitored apps and everything should still work fine:

    management.endpoints.web.discovery.enabled=false
    

    【讨论】:

      猜你喜欢
      • 2022-12-02
      • 2022-12-27
      • 2022-12-28
      • 2022-12-02
      • 2022-12-02
      • 2022-12-27
      • 2022-12-01
      • 2022-12-01
      • 2022-12-01
      相关资源
      最近更新 更多