SpringBoot
Introduction
The Spring Boot Monitoring O11ySource enables comprehensive observability for Spring Boot applications by collecting application, JVM, Tomcat, JDBC, executor, and Actuator-based metrics. It leverages Spring Boot Actuator endpoints and JMX integrations to provide real-time visibility into application health, performance, resource utilization, thread activity, request handling, and operational insights for proactive monitoring and faster troubleshooting.
Getting Started
Compatibility
vuSmartMaps support Spring Boot monitoring for applications with the following requirements:
- Java Version: 8 or above
- Spring Boot Version: 2.x or above
- Build Tool: Maven version 3.8.4 or above
Data Collection Method
vuSmartMaps collects metrics for Spring Boot application using VuNet's Internal Data Collector.
Prerequisites
Inputs for Configuring Data Source
- Host: The IP address or FQDN of the Spring Boot application. This field uniquely identifies each application added in this source configuration.
- Port Number: The port in which the application is running
- Application Name: Unique name of the Spring Boot Application.
- Environment: Environment in which the application is running
- Period (in seconds): How frequently data is gathered. The period should be between 60 seconds and 300 seconds.
Applications
nan
Firewall Requirement
To collect data from this O11ySource, ensure the following ports are opened:
| Source IP | Destination IP | Destination Port | Protocol | Direction |
|---|---|---|---|---|
| IP address of the server where vuSmartMaps is running | IP Address of the Spring Boot application | Port of the application / Port of the actuator endpoint | TCP | Outbound |
*Before providing the firewall requirements, please update the port based on the customer environment.
Configuring the Target
The Spring Boot application must be configured to expose its health and performance metrics:
Dependencies: Add the following to your pom.xml: <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-actuator</artifactId> </dependency> <dependency> <groupId>io.micrometer</groupId> <artifactId>micrometer-registry-prometheus</artifactId> <scope>runtime</scope> </dependency> Endpoint Exposure: In src/main/resources/application.properties, enable the required endpoints: management.endpoints.web.exposure.include=* management.endpoints.web.base-path=/actuator management.endpoint.health.show-details=always management.endpoint.health.show-components=always Endpoints Required:
-
- /actuator/prometheus (Performance & JVM metrics)
-
- /actuator/threaddump (Thread activity)
Configuration Steps
Metrics Collected
| Name | Description | Data Type |
|---|---|---|
| Application | Name of the application | String |
| Application Ready Time | Time taken for the application to be ready to service requests | UInt64 |
| Application Started Time | Time taken to start the application | UInt64 |
| Blocked Count | The accumulated time (in milliseconds) the thread has spent in the BLOCKED state (or -1 if unavailable). | UInt64 |
| Blocked Time | The total number of times the thread has entered the BLOCKED state. | Int64 |
| BU ID | BU Id | String |
| Disk Free | Usable space for path | UInt64 |
| Disk Total | Total space for path | UInt64 |
| Environment | The environment in which the application is deployed | String |
| Executor Active Threads | The approximate number of threads that are actively executing tasks | UInt32 |
| Executor Pool Max Threads | The maximum allowed number of threads in the pool | UInt32 |
| Executor Pool Size Threads | The current number of threads in the pool | UInt32 |
| Executor Queue Remaining Tasks | The number of additional elements that this queue can ideally accept without blocking | UInt32 |
| Executor Queued Tasks | The approximate number of tasks that are queued for execution | UInt32 |
| Hikaricp Connections | Total number of connections in the HikariCP connection pool | UInt32 |
| Hikaricp Connections Acquire Seconds Count | Time taken to acquire a connection from the pool | Float64 |
| Hikaricp Connections Acquire Seconds Max | Time taken to acquire a connection from the pool | Float64 |
| Hikaricp Connections Acquire Seconds Sum | Time taken to acquire a connection from the pool | Float64 |
| Hikaricp Connections Active | Number of currently active (in-use) connections in the pool | UInt32 |
| Hikaricp Connections Creation Seconds Count | Time taken to create a new connection in the pool | Float64 |
| Hikaricp Connections Creation Seconds Max | Time taken to create a new connection in the pool | Float64 |
| Hikaricp Connections Creation Seconds Sum | Time taken to create a new connection in the pool | Float64 |
| Hikaricp Connections Idle | Number of idle (available) connections in the pool | UInt32 |
| Hikaricp Connections Max | Maximum number of connections allowed in the pool | UInt32 |
| Hikaricp Connections Min | Minimum number of connections maintained in the pool | UInt32 |
| Hikaricp Connections Pending | Number of threads currently waiting for a connection | UInt32 |
| Hikaricp Connections Timeout Total | Total number of connection requests that timed out | UInt32 |
| Hikaricp Connections Usage Seconds Count | Usage time of the connections by the application | Float64 |
| Hikaricp Connections Usage Seconds Max | Usage time of the connections by the application | Float64 |
| Hikaricp Connections Usage Seconds Sum | Usage time of the connections by the application | Float64 |
| Host | Name of the host | String |
| HTTP Server Requests Active Seconds Count | Total HTTP requests, with count, total time, and max duration. | Float64 |
| HTTP Server Requests Active Seconds Max | Total HTTP requests, with count, total time, and max duration. | Float64 |
| HTTP Server Requests Active Seconds Sum | Total HTTP requests, with count, total time, and max duration. | Float64 |
| HTTP Server Requests Seconds Count | Tracks the total number of HTTP requests processed by the Spring Boot application over time. | Float64 |
| HTTP Server Requests Seconds Max | Shows the maximum response time observed for HTTP requests in the Spring Boot application. | Float64 |
| HTTP Server Requests Seconds Sum | Represents the cumulative total time spent processing HTTP requests in the Spring Boot application. | Float64 |
| JDBC Connections Active | Current number of active connections that have been allocated from the data source | UInt32 |
| JDBC Connections Idle | Number of established but idle connections | UInt32 |
| JDBC Connections Max | Maximum number of active connections that can be allocated at the same time | UInt32 |
| JDBC Connections Min | Minimum number of idle connections in the pool | UInt32 |
| JVM Buffer Count Buffers | An estimate of the number of buffers in the pool | UInt32 |
| JVM Buffer Memory Used | An estimate of the memory that the Java virtual machine is using for this buffer pool | UInt64 |
| JVM Buffer Total Capacity | An estimate of the total capacity of the buffers in this pool | UInt64 |
| JVM Classes Loaded Classes | The number of classes that are currently loaded in the Java virtual machine | UInt32 |
| JVM Classes Unloaded Classes Total | The number of classes unloaded in the Java virtual machine | UInt32 |
| JVM Compilation Time Ms Total | The approximate accumulated elapsed time spent in compilation | UInt64 |
| JVM GC Live Data Size | Size of long-lived heap memory pool after reclamation | UInt64 |
| JVM GC Max Data Size | Max size of long-lived heap memory pool | UInt64 |
| JVM GC Memory Allocated Bytes Total | Incremented for an increase in the size of the (young) heap memory pool after one GC to before the next | UInt64 |
| JVM GC Memory Promoted Bytes Total | Count of positive increases in the size of the old generation memory pool before GC to after GC | UInt64 |
| JVM GC Overhead | An approximation of the percent of CPU time used by GC activities | Float64 |
| JVM GC Pause Seconds Count | Tracks the total number of JVM Garbage Collection pause events occurring in the Spring Boot application. | Float64 |
| JVM GC Pause Seconds Max | Displays the maximum JVM Garbage Collection pause duration observed in the Spring Boot application. | Float64 |
| JVM GC Pause Seconds Sum | Represents the cumulative total time spent in JVM Garbage Collection pauses for the Spring Boot application | Float64 |
| JVM Info | JVM version info | UInt32 |
| JVM Memory Committed | The amount of memory in bytes that is committed for the JVM to use | UInt64 |
| JVM Memory Max | The maximum amount of memory in bytes that can be used for memory management | UInt64 |
| JVM Memory Usage After GC | The percentage of long-lived heap pool used after the last GC event | Float64 |
| JVM Memory Used | The amount of used memory | UInt64 |
| JVM Threads Daemon Threads | The current number of live daemon threads | UInt32 |
| JVM Threads Live Threads | The current number of live threads including both daemon and non-daemon threads | UInt32 |
| JVM Threads Peak Threads | The peak live thread count since JVM started | UInt32 |
| JVM Threads Started Threads Total | The total number of application threads started in the JVM | UInt32 |
| JVM Threads States Threads | The current number of threads | UInt32 |
| Lock Owner ID | The ID of the thread that owns the lock the current thread is waiting for (or -1 if no owner). | Int64 |
| Logback Events Total | Number of log events that were enabled by the effective log level | UInt32 |
| Port | The port number of the server | UInt32 |
| Priority | The thread's assigned priority level. | UInt8 |
| Process CPU Time Ns Total | The "cpu time" used by the JVM process | UInt64 |
| Process CPU Usage | The "recent cpu usage" for the JVM process | Float64 |
| Process Files Max Files | The maximum file descriptor count | UInt32 |
| Process Files Open Files | The open file descriptor count | UInt32 |
| Process Start Time | Start time of the process since unix epoch | Float64 |
| Process Uptime | The uptime of the JVM | Float64 |
| Spring Data Repository Invocations Seconds Count | Duration of repository invocations | Float64 |
| Spring Data Repository Invocations Seconds Max | Duration of repository invocations | Float64 |
| Spring Data Repository Invocations Seconds Sum | Duration of repository invocations | Float64 |
| System CPU Count | The number of processors available to the JVM | UInt32 |
| System CPU Usage | The "recent cpu usage" of the system | Float64 |
| System Load Average 1 M | Average system load over 1 minute | Float64 |
| Tags | JSON of all the tags associated with the given event | Map(LowCardinality(String), String) |
| Target | Target server | String |
| Tenant ID | Tenant ID | String |
| Thread ID | The unique ID of the thread. | UInt64 |
| Timestamp | Timestamp of the event | DateTime64 |
| Tomcat Sessions Active Current Sessions | Current active sessions | UInt32 |
| Tomcat Sessions Active Max Sessions | Peak concurrent sessions | UInt32 |
| Tomcat Sessions Alive Max Sessions | Max session lifetime (sec) | Float64 |
| Tomcat Sessions Created Sessions Total | Total sessions created | UInt32 |
| Tomcat Sessions Expired Sessions Total | Total sessions expired | UInt32 |
| Tomcat Sessions Rejected Sessions Total | Total sessions rejected | UInt32 |
| URL | URL of the endpoint from which data is being collected | String |
| Waited Count | The total number of times the thread has entered the WAITING or TIMED_WAITING state. | UInt64 |
| Waited Time | The accumulated time (in milliseconds) the thread has spent in the WAITING or TIMED_WAITING state (or -1 if unavailable). | Int64 |
| Tomcat Sessions Alive Max | Represents the maximum time (in seconds) that any active session has been alive in the Tomcat server during the observation period. | Float64 |
