Skip to content

Latest commit

 

History

History
30 lines (20 loc) · 1 KB

File metadata and controls

30 lines (20 loc) · 1 KB

spring-boot-2.0-prometheus-metrics

This is the sample repository for monitoring Spring Boot 2.0 by Prometheus.

Spring Boot 2.0 include Micrometer, which provides a simple facade over the instrumentation clients for the most popular monitoring systems.

See pom.xml!
That only setting makes your application monitored!!

How to run

Substitute your_ip in prometheus.yml and path_prometheus_yml in the following command.

After you execute the following command, Spring Boot application and Prometheus will start up on 8080 and 9090 port respectively.

$ ./mvnw spring-boot:run
$ docker run -p 9090:9090 -v path_prometheus_yml:/etc/prometheus/prometheus.yml prom/prometheus

Access

Application Url
Spring Boot http://localhost:8080/actuator/prometheus
Prometheus http://localhost:9090/graph