https://github.com/moelholm/prometheus-spring-boot-starter
Spring Boot Starter for enabling a Prometheus actuator endpoint
https://github.com/moelholm/prometheus-spring-boot-starter
java prometheus spring spring-boot
Last synced: 10 days ago
JSON representation
Spring Boot Starter for enabling a Prometheus actuator endpoint
- Host: GitHub
- URL: https://github.com/moelholm/prometheus-spring-boot-starter
- Owner: moelholm
- Created: 2017-02-06T19:25:16.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-11-14T09:30:15.000Z (about 8 years ago)
- Last Synced: 2024-11-15T02:55:24.890Z (about 1 year ago)
- Topics: java, prometheus, spring, spring-boot
- Language: Java
- Size: 62.5 KB
- Stars: 54
- Watchers: 4
- Forks: 14
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# A Spring Boot Starter for Prometheus
This is Spring Boot Starter module for activating a Prometheus endpoint in Spring Boot applications.
[](https://travis-ci.org/moelholm/prometheus-spring-boot-starter) [](https://maven-badges.herokuapp.com/maven-central/com.moelholm/prometheus-spring-boot-starter)
### What you get
A new Spring Boot Actuator endpoint - designed for Prometheus:
http://localhost:8080/prometheus
If you curl that you will get something like:
# HELP heap_used heap_used
# TYPE heap_used gauge
Exactly how Prometheus likes it.
### How you get it
It's as easy as any other Spring Boot Starter ;). Find your recipe below...
Gradle:
compile "com.moelholm:prometheus-spring-boot-starter:1.0.1"
Maven:
com.moelholm
prometheus-spring-boot-starter
1.0.1
### Configuration
You can configure 2 x properties - here shown with their default values:
endpoints.prometheus.path = /prometheus
endpoints.prometheus.sensitive = false
Same configuration as you will find with the standard Spring Boot Actuator endpoints.
### Alternatives
There are other starters as well:
- https://github.com/thomasdarimont/prometheus-spring-boot-starter
- https://github.com/akaGelo/spring-boot-starter-prometheus
Both actually existed at the time I started development of this starter. The first one is simple
but lacks two things: being in the Maven Central and using Spring Boot Actuator endpoints. The second
one is very much like this starter - but additionally comes with health indicator information as well.
Personally I found the implementation a bit complex - contrary to Thomas' implementation. Hence this starter:
a kind of mashup ;)