Configuration Guide
1. Overview
FT System Metrics is configured through the following sources:
| Source | Description |
|---|---|
|
Main Spring Boot configuration with profiles for MySQL and Oracle |
Environment Variables |
Override parameters via environment variables ( |
|
Prometheus scrape target configuration |
Docker Compose |
Service stack configuration (ports, volumes, health checks) |
2. Application YAML
The file src/main/resources/application.yml uses multi-document YAML with Spring profile groups.
2.1. Global Settings
spring:
application:
name: ft-system-metrics
threads:
virtual:
enabled: true # Java 25 virtual threads
server:
port: ${SERVER_PORT:8080}
| Property | Default | Description |
|---|---|---|
|
|
Application name, used in metric tags |
|
|
Enables Java 25 virtual threads for better concurrency |
|
|
Application HTTP port (default 8080; in Docker the host port is mapped to 8090 via |
2.2. Actuator & Metrics Settings
management:
endpoints:
web:
exposure:
include: health,info,prometheus,metrics
endpoint:
health:
show-details: always
metrics:
tags:
application: ${spring.application.name}
distribution:
percentiles-histogram:
http.server.requests: true
sla:
http.server.requests: 10ms, 50ms, 100ms, 200ms, 500ms
| Property | Default | Description |
|---|---|---|
|
|
Exposed Actuator endpoints |
|
|
Show detailed health check information (including database status) |
|
|
Global |
|
|
HTTP request percentile histogram |
|
|
SLA buckets for HTTP request duration distribution |
2.3. Common JPA Settings (profile: common)
spring:
jpa:
hibernate:
ddl-auto: none # Read-only, no schema modifications
show-sql: ${JPA_SHOW_SQL:false}
open-in-view: false
properties:
hibernate:
format_sql: true
jdbc:
time_zone: UTC
jdbc.lob:
non_contextual_creation: true
jakarta:
persistence:
validation:
mode: none
| Property | Default | Description |
|---|---|---|
|
|
Do not modify the database schema — the service operates in read-only mode |
|
|
SQL query logging (enable for debugging) |
|
|
Disables the Open Session in View anti-pattern |
|
|
Timezone for all database operations |
|
|
Disables JPA validation (service only reads data) |
3. Environment Variables
3.1. Application Configuration
| Variable | Default | Description |
|---|---|---|
|
|
Host port for Docker port mapping (container always listens on 8080; 8090 avoids conflict with ACS) |
|
|
Database selection: |
|
|
JVM parameters |
|
|
Container timezone |
|
|
SQL query logging |
|
|
Directory for application log files (see Logging) |
3.2. Database Configuration (Common)
| Variable | Default | Description |
|---|---|---|
|
|
FTACS database host |
|
|
Database connection password |
|
|
Maximum HikariCP connection pool size |
|
|
Minimum number of idle connections in the pool |
3.3. MySQL-Specific Variables
| Variable | Default | Description |
|---|---|---|
|
|
MySQL server port |
|
|
MySQL username |
|
|
MySQL database (schema) name |
|
auto-generated |
Full JDBC URL (overrides individual parameters) |
3.4. Oracle-Specific Variables
| Variable | Default | Description |
|---|---|---|
|
|
Oracle listener port |
|
|
Oracle username |
|
|
Oracle service name |
|
auto-generated |
Full JDBC URL (overrides individual parameters) |
3.5. Monitoring Stack Variables
| Variable | Default | Description |
|---|---|---|
|
|
External Prometheus port (Docker Compose) |
|
|
External Grafana port (Docker Compose) |
|
|
Grafana admin password |
|
|
Root folder for persistent data (Prometheus, Grafana) |
4. Spring Profiles
The application uses profile groups to organize configuration:
spring:
profiles:
group:
mysql: [ common, mysql ]
oracle: [ common, oracle ]
| Profile | Contents |
|---|---|
|
JPA settings (ddl-auto, format_sql, timezone), HikariCP pool configuration, validation mode |
|
MySQL JDBC driver, connection URL, MySQLDialect, MySQL-specific HikariCP settings (rewriteBatchedStatements, connectionTimeZone) |
|
Oracle JDBC driver, connection URL, OracleDialect |
5. HikariCP Connection Pool
Advanced connection pool parameters (profile: common):
| Variable | Default | Description |
|---|---|---|
|
|
Maximum pool size |
|
|
Minimum idle connections |
|
|
Register JMX MBeans for pool monitoring |
|
|
Maximum idle time for a connection (ms) |
|
|
Timeout for obtaining a connection from the pool (ms) |
|
|
Maximum lifetime of a connection (ms) |
|
|
Connection validation timeout (ms) |
|
|
Prepared statement caching |
|
|
Prepared statement cache size |
|
|
Maximum SQL length for caching |
|
|
Use server-side prepared statements |
6. Logging
The application uses Logback with a Spring Boot integration (logback-spring.xml).
6.2. File Output
File logging is enabled for profiles local, mysql, oracle, and test.
Log files are written to the path defined by LOG_PATH (defaults to logs/ relative to the working directory — /app/logs inside the Docker container).
| Variable | Default | Description |
|---|---|---|
|
|
Directory for log files (inside the container: |
Rotation policy:
| Parameter | Value |
|---|---|
Rotation |
Daily ( |
Retention |
30 days |
7. Prometheus Configuration
The prometheus.yml file in the project root:
global:
scrape_interval: 15s
evaluation_interval: 15s
scrape_configs:
- job_name: 'spring-boot-app'
metrics_path: '/actuator/prometheus'
static_configs:
- targets: ['ft-system-metrics:8080']
| Parameter | Default | Description |
|---|---|---|
|
|
Metrics polling frequency |
|
|
Recording/alerting rule evaluation frequency |
|
|
Metrics endpoint path |
|
|
Application address (Docker Compose service name and container port) |
|
When running via |