Skip to content

Latest commit

 

History

History
43 lines (25 loc) · 1.34 KB

README.md

File metadata and controls

43 lines (25 loc) · 1.34 KB

Overview

This is a poc using Spring Boot 2.2 and Prometheus Push Gateway with Micrometer.

The Prometheus Pushgateway exists to allow ephemeral and batch jobs to expose their metrics to Prometheus. Since these kinds of jobs may not exist long enough to be scraped, they can instead push their metrics to a Pushgateway. The Pushgateway then exposes these metrics to Prometheus.

Setup

Prometheus Push Gateway

First, run the command bellow:

docker run -d --net=host --name=prometheus-pushgateway prom/pushgateway:latest

Second, open the browser and access the address http://localhost:9091

Application

Start the application

mvn spring-boot:run

Testing

First, call the endpoint http:\\localhost:8080\hello

Second, open the Prometheus Push Gateway http:\\localhost:9091 and see the measurements, mainly the hello-counter

alt text

Third, be happy

Observations

This poc was based on this pull request.