Spring Boot 1.x 1,2091,209 4.0 (1 reviews)
Dashboard for Spring Boot 1.x applications, using Micrometer and Prometheus.
Features
- Overall status
- API stats
- Tomcat
- JVM
Variables
Only one variable is declared in Grafana:
$job: property "job_name" coming from prometheus.yml config file
Enable Actuator /prometheus endpoint
Here are the dependencies to add in pom.xml:
<!-- Actuator (with security enabled) -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<!-- Monitoring endpoint - Micrometer + Prometheus -->
<dependency>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-spring-legacy</artifactId>
<version>1.0.6</version>
</dependency>
<dependency>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-registry-prometheus</artifactId>
<version>1.0.6</version>
</dependency>
Add config in prometheus.yml
Snippet for a https endpoint:
- job_name: my-app-prod
scheme: https
basic_auth:
username: your_actuator_user
password: your_actuator_password
metrics_path: /MyApp/actuator/prometheus
static_configs:
- targets:
- "your_hostname:your_port"
Snippet for a http endpoint:
- job_name: my-app-prod
scheme: http
metrics_path: /MyApp/actuator/prometheus
static_configs:
- targets:
- "your_hostname:your_port"
Used Metrics 3434
-
up
http_server_requests_seconds_sum
http_server_requests_seconds_count
process_uptime_seconds
logback_events_total
topk
http_server_requests_seconds_max
tomcat_threads_busy
tomcat_threads_current
tomcat_threads_config_max
jvm_memory_used_bytes
jvm_memory_max_bytes
jvm_memory_committed_bytes
process_memory_vss_bytes
process_memory_rss_bytes
process_memory_pss_bytes
process_memory_swap_bytes
process_memory_swappss_bytes
jvm_gc_pause_seconds_count
jvm_gc_pause_seconds_sum
jvm_gc_pause_seconds_max
jvm_gc_memory_allocated_bytes_total
jvm_gc_memory_promoted_bytes_total
system_cpu_usage
process_cpu_usage
system_load_average_
jvm_threads_live
jvm_threads_daemon
jvm_threads_peak
process_threads
-
process_open_fds
-
process_max_fds
process_files_open
process_files_max