This is a very basic Spring Boot application that exposes a web application at http://localhost:8080/
Run it as follows:
$ ./mvnw spring-boot:run
The application is configured to expose a Prometheus endpoint at http://localhost:8080/actuator/prometheus
If you don't have a Prometheus at hand, simply download it, unzip it somewhere and start with:
$ ./prometheus --config.file=`pwd`/prometheus.yml
Or you can configure your own Prometheus by adding a scrape config section as follows:
- job_name: 'my-spring-boot-app'
static_configs:
- targets: ['127.0.0.1:8080']
metrics_path: /actuator/prometheusOnce that is done, you can run reliably as follows (you need at least reliably 0.23.0):
# refresh indicators every 10s
$ reliably slo agent -i10 -m reliably.yaml
$ reliably slo report -w -m reliably.yaml
Refreshing SLO report every 3 seconds. Press CTRL+C to quit.
Current Objective / Time Window Type Trend
Service #1: my spring boot app
✅ 99% of requests return 2xx over last 1 hour 99.42% 99% / 1h0m0s ✕ ✕ ✕ ✕ ✓