Menu

Spring Boot integration for Grafana Cloud

Spring Boot is Spring’s convention-over-configuration solution for creating stand-alone, production-grade Spring-based Applications. This integration enables the agent to send metrics to Grafana Cloud along with a useful default dashboard for visualization.

Pre-install configuration for the Spring Boot integration

This integration monitors a Spring Boot app.

The dashboard is a modified version of the Spring Boot Statistics community dashboard.

The application must have the actuator enabled. The application.properties should have management.endpoints.web.exposure.include configured to include prometheus.

Refer to the demo application for details.

Install Spring Boot integration for Grafana Cloud

  1. In your Grafana Cloud instance, click Integrations and Connections (lightning bolt icon).
  2. Navigate to the Spring Boot tile and review the prerequisites. Then click Install integration.
  3. Once the integration is installed, follow the steps on the Configuration Details page to setup Grafana Agent and start sending Spring Boot metrics to your Grafana Cloud instance.

Post-install configuration for the Spring Boot integration

In the agent configuration file, the agent must be pointed to the Spring Boot process, such as spring-boot:1235 in the example below, that exposes the /actuator/prometheus endpoint.

metrics:
  wal_directory: /tmp/wal
  global:
    scrape_interval: 60s
  configs:
  - name: integrations 
    scrape_configs:
      - job_name: integrations/spring-boot
        static_configs:
          - targets: ['spring-boot:1235']
        metrics_path: /actuator/prometheus
    remote_write:
      - url: http://cortex:9009/api/prom/push

Dashboards

The Spring Boot integration installs the following dashboards in your Grafana Cloud instance to help monitor your metrics.

  • Spring Boot Statistics

Spring Boot Statistics

image

Metrics

The following metrics are automatically written to your Grafana Cloud instance by connecting your Spring Boot instance through this integration:

  • hikaricp_connections
  • hikaricp_connections_acquire_seconds_count
  • hikaricp_connections_acquire_seconds_sum
  • hikaricp_connections_active
  • hikaricp_connections_creation_seconds_count
  • hikaricp_connections_creation_seconds_sum
  • hikaricp_connections_idle
  • hikaricp_connections_pending
  • hikaricp_connections_timeout_total
  • hikaricp_connections_usage_seconds_count
  • hikaricp_connections_usage_seconds_sum
  • http_server_requests_seconds_count
  • http_server_requests_seconds_sum
  • jvm_buffer_memory_used_bytes
  • jvm_buffer_total_capacity_bytes
  • jvm_classes_loaded_classes
  • jvm_classes_unloaded_classes_total
  • jvm_gc_memory_allocated_bytes_total
  • jvm_gc_memory_promoted_bytes_total
  • jvm_gc_pause_seconds_count
  • jvm_gc_pause_seconds_sum
  • jvm_memory_committed_bytes
  • jvm_memory_max_bytes
  • jvm_memory_used_bytes
  • jvm_threads_daemon_threads
  • jvm_threads_live_threads
  • jvm_threads_peak_threads
  • logback_events_total
  • process_cpu_usage
  • process_files_max_files
  • process_files_open_files
  • process_start_time_seconds
  • process_uptime_seconds
  • system_cpu_count
  • system_cpu_usage
  • system_load_average_1m
  • tomcat_global_error_total
  • tomcat_global_received_bytes_total
  • tomcat_global_sent_bytes_total
  • tomcat_sessions_active_current_sessions
  • tomcat_threads_busy
  • tomcat_threads_config_max_threads
  • tomcat_threads_current_threads

Changelog

# 0.0.4 - January 2023

* Adding Job filter and making filters All and Multi selectable

# 0.0.3 - September 2022

* Update dashboard panels descriptions.

# 0.0.2 - October 2021

* Update mixin to latest version:
  - Update queries to use $__rate_interval

# 0.0.1 - December 2020

* Initial release

Cost

By connecting your Spring Boot instance to Grafana Cloud you might incur charges. To view information on the number of active series that your Grafana Cloud account uses for metrics included in each Cloud tier, see Active series and dpm usage and Cloud tier pricing.