Failed to access Spring Endpoint "Actuator Drive"

I can get access to endpoints as http://localhost:8081/health, /status, /env, /metrics, /shutdown, but not /actuator , or /loginfoend points.

Getting below exception.

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

How to access http: // localhost: 8081 / drive endpoint ?

+16
source share
13 answers

Starting in spring, version 2.0.1 will use the property below

management.endpoints.web.exposure.include=<comma separated endpoints you wish to expose>

* , .

, , . bean-, /actuator/beans.

, .

+18

2017-11-09 23:27:14.572  INFO 30483 --- [nio-8080-exec-2] s.b.a.e.m.MvcEndpointSecurityInterceptor : Full authentication is required to access actuator endpoints. Consider adding Spring Security or set 'management.security.enabled' to false.

, applicaiton.properties

management.security.enabled=false 

+5

Spring Boot 2.0.0, /application/health.

Gradle:

compile('org.springframework.boot:spring-boot-starter-actuator')
springBootVersion = '2.0.0.M3'*

build.gradle 1.5.4.RELEASE. .

curl -i localhost:8080/health

HTTP/1.1 200
X-Application-Context: application
Content-Type: application/vnd.spring-boot.actuator.v1+json;charset=UTF-8
Transfer-Encoding: chunked
Date: Wed, 14 Jun 2017 20:45:51 GMT

{"status":"UP"}
+3

springboot 2.0.5.RELEASE springboot 2.0.5.RELEASE http://hostname:portnumber/applicationroot/actuator/health

,

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-actuator</artifactId>
        </dependency>
+3

, "" . , . , (, shutdown), (, ).

:

endpoints.sensitive=true

:

endpoints.actuator.enabled=true
endpoints.logfile.enabled=true
+2

http://localhost:8080/actuator/ activator http://localhost:8080/actuator/ yo, , (3 ), , application.properties/yml :

management.endpoints.web.exposure.include=*
+2

https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-2.0-Migration-Guide#base-path

application.properties, http://localhost: 8080/beans ( /health,/env)

server.port=8080
management.endpoints.web.base-path=/
management.endpoints.web.exposure.include=*
+2

.

,

0

, /loginfo docs

/ , . question

0
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
0

Spring Boot 2.1.5.

HTTP://: 8080//

,

 <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-actuator</artifactId>
 </dependency>

, application.properties

management.endpoints.web.exposure.include = *

0

It looks like you have mapped your endpoints Actuatorwith the base path /. Check if your configuration has the following line:

management.endpoints.web.base-path=/

Thus, if you skip this line, then you will get access to all endpoints in the path actuator, for example:

http://localhost:8081/actuator/health

and the drive itself will be available here:

http://localhost:8081/health
0
source

Source: https://habr.com/ru/post/1629640/


All Articles