Table of content |
---|
1. Description |
2. Running the project |
- 1.1 Local |
3. Pending |
Sample project for monitoring using micrometer and prometheus.
Discovery of services is done through Eureka using the consul-adapter
Start the services independently.
./gradlew build
java -jar build/libs/*.jar
Then run prometheus on docker, build the image:
docker build -t goofyahead/prometheus .
and Run it:
docker run -p 9090:9090 goofyahead/prometheus
-
Expose only /health & /prometheus endpoint and secure it
-
Make prometheus use a M2M token
https://spring.io/blog/2018/03/16/micrometer-spring-boot-2-s-new-application-metrics-collector
Backport to spring 1.5 -> https://micrometer.io/docs/ref/spring/1.5
https://www.callicoder.com/spring-boot-actuator-metrics-monitoring-dashboard-prometheus-grafana/
https://github.com/twinformatics/eureka-consul-adapter
https://prometheus.io/docs/prometheus/latest/configuration/configuration/#%3Cconsul_sd_config%3E
https://blog.pvincent.io/2017/12/prometheus-blog-series-part-1-metrics-and-labels/
https://touk.pl/blog/2018/03/05/spring-boot-2-0-http-request-metrics-with-micrometer/
https://micrometer.io/docs/ref/spring/1.5
https://www.codeprimers.com/metrics-collection-in-spring-boot-with-micrometer-and-prometheus/