Monitoring and collecting data from Spring Boot
Spring Boot makes it easy to create stand-alone, production-grade Spring based Applications that you can “just run”. We take an opinionated view of the Spring platform and third-party libraries so you can get started with minimum fuss.
More information on: https://projects.spring.io/spring-boot/
How it works
This plugin analyzes the performance of your SprintBoot web server. It captures traffic rates, latencies and response codes of http requests sent to the web server by parsing the access log file. The plugin can optionally get global statistics (eg. the number of sessions, the number of workers, etc.) and component health status by using the Spring Boot actuator endpoint.
The plugin needs to be installed together with a CoScale agent, instructions on how to install the CoScale agent can be found here. If you want to monitor Spring Boot inside Docker containers using CoScale, check out the instructions here.
Configure the actuator endpoint
The plugin will access the actuator
metrics endpoint. To enable the actuator metrics functionality, you will need to add
spring-boot-starter-actuator as a dependency to your project.
Spring Boot 1.x
In order to get the actuator metrics we require Spring MVC to expose its endpoints through HTTP. You can decide whether the endpoint will be sensitive (meaning not public and requires a user/password to access) or not. For example, add the following entries in the
application.properties to customize the
Spring Boot 2.x
In 2.x Spring Boot simplifies the actuator security model by merging it with the application one and the endpoints have moved to the
/actuator/metrics location. The metrics endpoint will need to be marked as exposed in your
Configure your Spring Boot access logs
Enable the Spring Boot access log format. Add the following configuration to your
application.properties. The configuration differs depending on the embedded servlet container you are using.
Then use this
%h %v %I %u %t "%r" %s %B %D logformat for the plugin.
The plugin will check the actuator health endpoint, to determine your application latency and health status on a per component basis.
Spring Boot 1.x:
The health endpoint can be enabled in your application.properties by the following:
Spring Boot 2.x:
The health endpoint will need to be marked as exposed in your application.properties:
This plugin can be configured to perform a HTTP GET on your Spring Boot. This active monitoring allows us to calculate the uptime of the service and the response time of the provided URL.
A full URL (eg.
http://localhost/test_page) should be provided.
|Spring Boot active check latency||s|
|Spring Boot active check uptime||%||Component|
|Spring Boot active http sessions||sessions|
|Spring Boot datasource current usage of the connection pool||#||Datasource|
|Spring Boot datasource number of active connections||connections||Datasource|
|Spring Boot max http sessions||sessions|
|Spring Boot request counts||requests||Path, Status|
|Spring Boot response time||s||Path|
|Spring Boot tomcat bytes received per second||b/s||Source|
|Spring Boot tomcat bytes sent per second||b/s||Source|
|Spring Boot tomcat expired sessions||sessions|
Spring Boot / JVM
|Spring Boot application context uptime||s|
|Spring Boot average system load|
|Spring Boot processors count||#|
|Spring Boot uptime||s|
Spring Boot / JVM / Classes
|Spring Boot loaded classes count||classes|
|Spring Boot total classes count||classes|
|Spring Boot unloaded classes count||classes|
Spring Boot / JVM / GC
|Spring Boot GC collection count||#||Collector|
|Spring Boot GC collection time||s||Collector|
|Spring Boot gc max size of old generation memory pool||b|
|Spring Boot gc memory allocated||b|
|Spring Boot size of old generation memory pool after a full gc||b|
Spring Boot / JVM / Memory
|Spring Boot commited heap memory||b|
|Spring Boot commited non heap memory||b|
|Spring Boot free memory||b|
|Spring Boot initial heap memory||b|
|Spring Boot initial non heap memory||b|
|Spring Boot jvm buffer pool memory usage||b|
|Spring Boot max heap memory||b|
|Spring Boot max non heap memory||b|
|Spring Boot total memory||b|
|Spring Boot used heap memory||b|
|Spring Boot used non heap memory||b|
Spring Boot / JVM / Threads
|Spring Boot daemon thread count||threads|
|Spring Boot peak thread count||threads|
|Spring Boot thread count||threads|
|Spring Boot tomcat max threads||threads||Source|
|Spring Boot total started thread count||threads|