45

http://localhost:8081/health/status/env、などのエンドポイントにはアクセスできますが 、/metricsまたはエンドポイントにはアクセスできません/shutdown /actuator/loginfo

例外を下回っています。

{"timestamp":1455929182552,"status":404,"error":"Not Found","message":"No message available","path":"/actuator"}

http://localhost:8081/ actuatorエンドポイントにアクセスするには?

4

20 に答える 20

11

Actuatorエンドポイントをベース パスにマッピングしたようです/。構成に次の行があるかどうかを確認します。

management.endpoints.web.base-path=/

したがって、この行を省略すると、actuatorパスの下のすべてのエンドポイントにアクセスします。たとえば、次のようになります。

http://localhost:8081/actuator/health

アクチュエータ自体はここでアクセス可能になります:

http://localhost:8081/actuator
于 2019-07-02T08:29:23.180 に答える
3

@Vinod の回答に基づいて、application.yml コンテンツを追加します。
Spring Boot 2.1.0 の場合、application.yml ファイルに以下のプロパティ値を追加してください。

management:
  endpoints:
    web:
      exposure:
        include: '*'
  endpoint:
    health:
      show-details: always
    beans:
      enabled: true

アプリケーションを実行しているローカル システム [ブラウザまたは郵便配達員] から​​以下の URL にアクセスします。

http://localhost:8080/actuator/metrics
http://localhost:8080/actuator/health
http://localhost:8080/actuator/beans

その他のエンドポイントについては、次のリンクを参照してください:
パート V. Spring Boot アクチュエーター: 本番対応の機能

于 2019-08-04T23:49:10.127 に答える
3
For spring boot 2.x.x please add below property value in application.property file.

management.endpoint.health.show-details=ALWAYS
management.endpoints.web.exposure.include=*
management.endpoint.beans.enabled=true

Access below url from your local system[either browser or postman] from where you are running a application.

http://localhost:8080/actuator/metrics
http://localhost:8080/actuator/health
http://localhost:8080/actuator/beans
于 2019-04-23T08:25:56.920 に答える
1

春ブーツ1.5.6

アクチュエーター 他のエンドポイントにハイパーメディアベースの「発見ページ」を提供します。Spring HATEOAS がクラスパス上にある必要があります。

参照してください: https://docs.spring.io/spring-boot/docs/1.5.6.RELEASE/reference/html/production-ready-endpoints.html

于 2018-08-24T07:40:07.730 に答える
0

application.ymlベースパスを / に変更し、/info を無効にするファイルは次のとおりです。

management:
  endpoints:
    web:
      base-path: /
  endpoint:
    #Disable /info
    info:
      enabled: false
    health:
      show-details: always
  health:
      defaults:
        enabled: false
于 2020-04-24T14:55:49.327 に答える
0

同じ問題がありました。

  1. コンソールで「無効な LOC ヘッダー (無効な署名)」などのエラーを確認してください。ログを取得するには、「mvn spring-boot:run」を実行します。
    私の sprint-boot-starter-actuator が壊れていました!

  2. 私の場合、アクチュエーターの URL は

それが役に立てば幸い

于 2017-02-15T20:07:36.863 に答える