Prometheus scrapes metrics from services exposing them over HTTP, typically at:
actuator/prometheus
This endpoint returns data in a text format like:
# HELP jvm_memory_used_bytes Used bytes of a given JVM memory area.
jvm_memory_used_bytes{area="heap",id="G1 Eden Space",} 4.5729792E7
All scraped metrics are stored with timestamps so you can:
Using PromQL (Prometheus Query Language), you can create dashboards (e.g., Grafana) or alerts like:
rate(http_server_requests_seconds_count{status="500"}[1m]) > 5
Youβre using:
management.endpoint.prometheus.enabled=true
management.endpoints.web.exposure.include=prometheus,health,info
So your app is ready to expose metrics at:
actuator/prometheus