Spring Boot Cache (3.x)
3,329

Created 6/12/2024
Updated 6/13/2024
Revision 1
Categories
Web Servers
Grafana Version >=11.0.0
Datasources
Prometheus

Introduction

This dashboard is designed to monitor the state and performance of caches used in a Spring Boot application. It uses Spring Boot Actuator to expose metrics and Prometheus to collect and store these metrics. Grafana is then used to visualize the collected data, providing insights into the cache's behavior.

Panels Overview

Cache Hit Rate (5m)

  • Description: Displays the cache hit rate over the last 5 minutes as a percentage. This helps in understanding how efficiently the cache is performing.
  • Metrics: cache_gets_total

Cache Size

  • Description: Shows the size of the cache over time. This helps in monitoring the capacity and utilization of the cache.
  • Metrics: cache_size

Cache Hit Count (1m)

  • Description: Counts the number of cache hits in the last minute. This helps in understanding the usage and effectiveness of the cache.
  • Metrics: cache_gets_total{ result="hit"}

Cache Miss Count (1m)

  • Description: Counts the number of cache misses in the last minute. This helps in identifying inefficiencies or issues with the cache.
  • Metrics: cache_gets_total{ result="miss"}

This dashboard is essential for maintaining the performance and efficiency of caches in microservices, allowing developers and operators to proactively identify and address issues.

Get Dashboard
Download
Copy to Clipboard
Source Grafana.com

Used Metrics 2

  • cache_gets_total

  • cache_size