Skip to content

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

License

Notifications You must be signed in to change notification settings

luramarchanjo/poc-spring-prometheus-gateway

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

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

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages