The Apps Manager UI supports several production-ready endpoints from Spring Boot Actuator. This topic describes the Actuator endpoints and how you can configure your app to display data from the endpoints in Apps Manager.
For more information about Spring Boot Actuator, see the Spring Boot Actuator documentation.
Important This feature requires Spring Boot v1.5 or later.
The Apps Manager integration with Spring Boot does not use the standard Spring Boot Actuators. Instead, it uses a specific set of actuators that are secured using the Space Developer role for the space that the application runs in. Authentication and authorization are automatically delegated to the Cloud Controller and the User Account and Authentication server without any configuration from the user.
By default, actuators are secure and cannot be accessed without explicit configuration by the user, even if Spring Security is not included. This allows users to take advantage of the Spring Boot Apps Manager integration without accidentally exposing their actuators without security.
The table below describes the Spring Boot Actuator endpoints supported by Apps Manager. To integrate these endpoints with Apps Manager, you must first Activate Spring Boot Actuator for Your App.
Endpoint | About |
---|---|
/info |
|
/health |
|
/loggers |
|
/dump |
|
/trace |
|
/heapdump |
|
/mappings |
|
You must add a spring-boot-starter-actuator
dependency to your app project for the production-ready HTTP endpoints to return values. For more information, see the Enabling production-ready features section of the Spring Boot documentation.
Follow the instructions below that correspond to your project type.
Maven: If you use Maven, add the following to your project:
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
</dependencies>
Gradle: If you use Gradle, add the following to your project:
dependencies {
compile("org.springframework.boot:spring-boot-starter-actuator")
}
If you use self-signed certificates in your Operations Manager deployment for UAA or the Cloud Controller, specify in your application.properties
file to skip SSL validation:
management.cloudfoundry.skip-ssl-validation=true
For more information, see Cloud Foundry support in the Spring Boot Actuator documentation.
The /info
endpoint provides information about the project build for your app, as well as its git details.
To add build information to the /info
endpoint, follow the instructions below that correspond to your project type.
Add the following to your app project:
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>1.4.2.RELEASE</version>
<executions>
<execution>
<goals>
<goal>build-info</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
Add the following to your app project:
springBoot {
buildInfo()
}
To add git information to the /info
endpoint, follow these instructions:
Add the following property to your application.properties
file:
management.info.git.mode=full
Follow the instructions below that correspond to your project type.
Add the following plugin to your project:
<build>
<plugins>
<plugin>
<groupId>pl.project13.maven</groupId>
<artifactId>git-commit-id-plugin</artifactId>
</plugin>
</plugins>
</build>
Add the following plugin to your project:
plugins {
id "com.gorylenko.gradle-git-properties" version "1.4.17"
}