Spring Boot JDBC & HikariCP

Spring Boot (Micrometer) with JDBC and HikariCP.

Spring Boot JDBC & HikariCP screenshot 1
Spring Boot JDBC & HikariCP screenshot 2
Spring Boot JDBC & HikariCP screenshot 3

Spring Boot JDBC & HikariCP

Grafana Dashboard of Spring Boot (by Micrometer metrics from Prometheus) for JDBC and HikariCP.

Supported Spring Boot 3.x.

See details in GitHub.

Configure Spring Boot Application

  1. Add one of Spring Boot database modules, for example, Spring Data Jpa or Spring Data JDBC.
  2. Add Spring Boot Actuator module with micrometer-registry-prometheus.
  3. Add configuration, for example, application.yml:
yaml
spring:
  application:
    name: myapp
  datasource:
    username: mydb_user
    password: mydb_pass
    url: jdbc:postgresql://localhost:5432/mydb
    hikari:
      minimum-idle: 2
      maximum-pool-size: 8
management:
  endpoints:
    web:
      exposure:
        include:
          - prometheus # Access by /actuator/prometheus
  metrics:
    tags:
      namespace: local # Namespace of k8s
      application: ${spring.application.name}

Configure Prometheus Job

Add job with pulling metrics from /actuator/prometheus, for example, on localhost:8080:

yaml
scrape_configs:
  - job_name: myapp-job
    scrape_interval: 15s
    metrics_path: /actuator/prometheus
    static_configs:
      - targets: [ localhost:8080 ]
Revisions
RevisionDescriptionCreated
Spring Boot

Spring Boot

by Grafana Labs
Grafana Labs solution

Easily monitor Spring Boot with Grafana Cloud's out-of-the-box monitoring solution.

Learn more

Get this dashboard

Import the dashboard template

or

Download JSON

Datasource
Dependencies